public SubscriberSendChannelBuilder( MessageSender messageSender, MessageCacheFactory messageCacheFactory, ISystemTime systemTime, ITaskRepeater taskRepeater, MessageAcknowledgementHandler acknowledgementHandler, ISerialiser serialiser, ITaskScheduler taskScheduler, SenderAuthenticationSessionAttacherFactory authenticationSessionAttacherFactory) { Contract.Requires(messageSender != null); Contract.Requires(messageCacheFactory != null); Contract.Requires(systemTime != null); Contract.Requires(taskRepeater != null); Contract.Requires(acknowledgementHandler != null); Contract.Requires(serialiser != null); Contract.Requires(taskScheduler != null); Contract.Requires(authenticationSessionAttacherFactory != null); this.messageSender = messageSender; this.messageCacheFactory = messageCacheFactory; this.systemTime = systemTime; this.taskRepeater = taskRepeater; this.acknowledgementHandler = acknowledgementHandler; this.serialiser = serialiser; this.taskScheduler = taskScheduler; this.authenticationSessionAttacherFactory = authenticationSessionAttacherFactory; }
public ReplySendChannelBuilder( MessageSender messageSender, ISerialiser serialiser, ISystemTime systemTime, ITaskRepeater taskRepeater, MessageCacheFactory messageCacheFactory, MessageAcknowledgementHandler acknowledgementHandler, ITaskScheduler taskScheduler, ReplyAuthenticationSessionAttacherFactory authenticationSessionAttacherFactory, ReplyCorrelationLookup correlationLookup) { Contract.Requires(messageSender != null); Contract.Requires(serialiser != null); Contract.Requires(systemTime != null); Contract.Requires(taskRepeater != null); Contract.Requires(messageCacheFactory != null); Contract.Requires(acknowledgementHandler != null); Contract.Requires(taskScheduler != null); Contract.Requires(authenticationSessionAttacherFactory != null); Contract.Requires(correlationLookup != null); this.messageSender = messageSender; this.serialiser = serialiser; this.systemTime = systemTime; this.taskRepeater = taskRepeater; this.messageCacheFactory = messageCacheFactory; this.acknowledgementHandler = acknowledgementHandler; this.taskScheduler = taskScheduler; this.authenticationSessionAttacherFactory = authenticationSessionAttacherFactory; this.correlationLookup = correlationLookup; }
public void Acknowledge() { if (AckHandler != null) { if (connection.IsClosed) { throw new IllegalStateException("Can not acknowledge Message on closed connection."); } AckHandler.Acknowledge(); AckHandler = null; } }
public AcknowledgementRecieveChannelBuilder( MessageReceiver messageReceiver, MessageAcknowledgementHandler handler, ISerialiser serialiser) { Contract.Requires(messageReceiver != null); Contract.Requires(handler != null); Contract.Requires(serialiser != null); this.messageReceiver = messageReceiver; this.handler = handler; this.serialiser = serialiser; }