public ReliableRequestSessionChannel( ChannelManagerBase factory, IReliableFactorySettings settings, IClientReliableChannelBinder binder, FaultHelper faultHelper, LateBoundChannelParameterCollection channelParameters, UniqueId inputID) : base(factory, binder.RemoteAddress, binder.Via, true) { this.settings = settings; this.binder = binder; this.session = new ClientReliableSession(this, settings, binder, faultHelper, inputID); this.session.PollingCallback = this.PollingCallback; this.session.UnblockChannelCloseCallback = this.UnblockClose; if (this.settings.ReliableMessagingVersion == ReliableMessagingVersion.WSReliableMessagingFebruary2005) { this.shutdownHandle = new InterruptibleWaitObject(false); } else { this.replyAckConsistencyGuard = new Guard(Int32.MaxValue); } this.binder.Faulted += OnBinderFaulted; this.binder.OnException += OnBinderException; this.channelParameters = channelParameters; channelParameters.SetChannel(this); }
public ReliableOutputSessionChannelOverRequest(ChannelManagerBase factory, IReliableFactorySettings settings, IClientReliableChannelBinder binder, FaultHelper faultHelper, LateBoundChannelParameterCollection channelParameters) : base(factory, settings, binder, faultHelper, channelParameters) { this.binder = binder; }
public ClientReliableSession(ChannelBase channel, IReliableFactorySettings factory, IClientReliableChannelBinder binder, FaultHelper faultHelper, UniqueId inputID) : base(channel, factory, binder, faultHelper) { this.binder = binder; base.InputID = inputID; this.pollingTimer = new InterruptibleTimer(this.GetPollingInterval(), new WaitCallback(this.OnPollingTimerElapsed), null); if (this.binder.Channel is IRequestChannel) { this.requestor = new RequestReliableRequestor(); } else if (this.binder.Channel is IDuplexChannel) { SendReceiveReliableRequestor requestor = new SendReceiveReliableRequestor { TimeoutIsSafe = !this.ChannelSupportsOneCreateSequenceAttempt() }; this.requestor = requestor; } MessageVersion messageVersion = base.Settings.MessageVersion; ReliableMessagingVersion reliableMessagingVersion = base.Settings.ReliableMessagingVersion; this.requestor.MessageVersion = messageVersion; this.requestor.Binder = this.binder; this.requestor.IsCreateSequence = true; this.requestor.TimeoutString1Index = "TimeoutOnOpen"; this.requestor.MessageAction = WsrmIndex.GetCreateSequenceActionHeader(messageVersion.Addressing, reliableMessagingVersion); if ((reliableMessagingVersion == ReliableMessagingVersion.WSReliableMessaging11) && (this.binder.GetInnerSession() is ISecureConversationSession)) { this.requestor.MessageHeader = new WsrmUsesSequenceSTRHeader(); } this.requestor.MessageBody = new CreateSequence(base.Settings.MessageVersion.Addressing, reliableMessagingVersion, base.Settings.Ordered, this.binder, base.InputID); this.requestor.SetRequestResponsePattern(); }
protected ChannelReliableSession(ChannelBase channel, IReliableFactorySettings settings, IReliableChannelBinder binder, FaultHelper faultHelper) { this.channel = channel; this.settings = settings; this.binder = binder; this.faultHelper = faultHelper; this.inactivityTimer = new InterruptibleTimer(this.settings.InactivityTimeout, new WaitCallback(this.OnInactivityElapsed), null); this.initiationTime = ReliableMessagingConstants.UnknownInitiationTime; }
public ClientReliableDuplexSessionChannel(ChannelManagerBase factory, IReliableFactorySettings settings, IReliableChannelBinder binder, FaultHelper faultHelper, LateBoundChannelParameterCollection channelParameters, UniqueId inputID) : base(factory, settings, binder) { this.clientSession = new DuplexClientReliableSession(this, settings, faultHelper, inputID); this.clientSession.PollingCallback = new ClientReliableSession.PollingHandler(this.PollingCallback); base.SetSession(this.clientSession); this.channelParameters = channelParameters; channelParameters.SetChannel(this); ((IClientReliableChannelBinder)binder).ConnectionLost += new EventHandler(this.OnConnectionLost); }
protected ChannelReliableSession(ChannelBase channel, IReliableFactorySettings settings, IReliableChannelBinder binder, System.ServiceModel.Channels.FaultHelper faultHelper) { this.channel = channel; this.settings = settings; this.binder = binder; this.faultHelper = faultHelper; this.inactivityTimer = new InterruptibleTimer(this.settings.InactivityTimeout, new WaitCallback(this.OnInactivityElapsed), null); this.initiationTime = ReliableMessagingConstants.UnknownInitiationTime; }
protected ChannelReliableSession(ChannelBase channel, IReliableFactorySettings settings, IReliableChannelBinder binder, FaultHelper faultHelper) { Channel = channel; Settings = settings; _binder = binder; FaultHelper = faultHelper; _inactivityTimer = new InterruptibleTimer(Settings.InactivityTimeout, new WaitCallback(OnInactivityElapsed), null); InitiationTime = ReliableMessagingConstants.UnknownInitiationTime; }
protected ReliableOutputSessionChannel(ChannelManagerBase factory, IReliableFactorySettings settings, IClientReliableChannelBinder binder, FaultHelper faultHelper, LateBoundChannelParameterCollection channelParameters) : base(factory) { this.settings = settings; this.binder = binder; this.session = new ClientReliableSession(this, settings, binder, faultHelper, null); this.session.PollingCallback = new ClientReliableSession.PollingHandler(this.PollingCallback); this.session.UnblockChannelCloseCallback = new ChannelReliableSession.UnblockChannelCloseHandler(this.UnblockClose); this.binder.Faulted += new BinderExceptionHandler(this.OnBinderFaulted); this.binder.OnException += new BinderExceptionHandler(this.OnBinderException); this.channelParameters = channelParameters; channelParameters.SetChannel(this); }
public ServerReliableSession( ChannelBase channel, IReliableFactorySettings listener, IServerReliableChannelBinder binder, FaultHelper faultHelper, UniqueId inputID, UniqueId outputID) : base(channel, listener, binder, faultHelper) { this.InputID = inputID; this.OutputID = outputID; }
protected ReliableOutputSessionChannel( ChannelManagerBase factory, IReliableFactorySettings settings, IClientReliableChannelBinder binder, FaultHelper faultHelper, LateBoundChannelParameterCollection channelParameters) : base(factory) { Settings = settings; _binder = binder; _session = new ClientReliableSession(this, settings, binder, faultHelper, null); _session.PollingCallback = PollingAsyncCallback; _session.UnblockChannelCloseCallback = UnblockClose; _binder.Faulted += OnBinderFaulted; _binder.OnException += OnBinderException; _channelParameters = channelParameters; channelParameters.SetChannel(this); }
public ClientReliableSession(ChannelBase channel, IReliableFactorySettings factory, IClientReliableChannelBinder binder, FaultHelper faultHelper, UniqueId inputID) : base(channel, factory, binder, faultHelper) { this.binder = binder; this.InputID = inputID; this.pollingTimer = new InterruptibleTimer(this.GetPollingInterval(), this.OnPollingTimerElapsed, null); if (this.binder.Channel is IRequestChannel) { this.requestor = new RequestReliableRequestor(); } else if (this.binder.Channel is IDuplexChannel) { SendReceiveReliableRequestor sendReceiveRequestor = new SendReceiveReliableRequestor(); sendReceiveRequestor.TimeoutIsSafe = !this.ChannelSupportsOneCreateSequenceAttempt(); this.requestor = sendReceiveRequestor; } else { Fx.Assert("This channel type is not supported"); } MessageVersion messageVersion = this.Settings.MessageVersion; ReliableMessagingVersion reliableMessagingVersion = this.Settings.ReliableMessagingVersion; this.requestor.MessageVersion = messageVersion; this.requestor.Binder = this.binder; this.requestor.IsCreateSequence = true; this.requestor.TimeoutString1Index = SR.TimeoutOnOpen; this.requestor.MessageAction = WsrmIndex.GetCreateSequenceActionHeader(messageVersion.Addressing, reliableMessagingVersion); if ((reliableMessagingVersion == ReliableMessagingVersion.WSReliableMessaging11) && (this.binder.GetInnerSession() is ISecureConversationSession)) { this.requestor.MessageHeader = new WsrmUsesSequenceSTRHeader(); } this.requestor.MessageBody = new CreateSequence(this.Settings.MessageVersion.Addressing, reliableMessagingVersion, this.Settings.Ordered, this.binder, this.InputID); this.requestor.SetRequestResponsePattern(); }
public ReliableOutputSessionChannelOverDuplex(ChannelManagerBase factory, IReliableFactorySettings settings, IClientReliableChannelBinder binder, FaultHelper faultHelper, LateBoundChannelParameterCollection channelParameters) : base(factory, settings, binder, faultHelper, channelParameters) { }
public DuplexClientReliableSession(ClientReliableDuplexSessionChannel channel, IReliableFactorySettings settings, FaultHelper helper, UniqueId inputID) : base(channel, settings, (IClientReliableChannelBinder)channel.Binder, helper, inputID) { this.channel = channel; }