com.neeve.sma
Class MessageBusBinding.AsynchronousFlushContext

java.lang.Object
  extended by com.neeve.sma.MessageBusBinding.FlushContext
      extended by com.neeve.sma.MessageBusBinding.AsynchronousFlushContext
Enclosing interface:
MessageBusBinding

public static final class MessageBusBinding.AsynchronousFlushContext
extends MessageBusBinding.FlushContext

Context for flushing using asychnronous semantics.

The user provides an instance of this class to the MessageBusBinding.flush(com.neeve.sma.MessageBusBinding.FlushContext) or MessageChannel.sendMessage(com.neeve.sma.MessageView, java.util.Properties, com.neeve.sma.MessageBusBinding.FlushContext, int) to request for asynchronous flush semantics. In case the flushing method did not flush the binding, none of the fields in this context are altered. In case the binding was flushed (implictly via the enquesend method or explicitly via the flush method) and the flush completed synchronously, the syncComplete flag is set. In case the flush could not complete synchronously, the inProgress flag is set to indicate that the flush has been scheduled for background completion. Upon completion of the flush, the inProgress flag is reset and the flush completion event (see com.neeve.sma.event) is dispatched to the users event handler.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.neeve.sma.MessageBusBinding.FlushContext
MessageBusBinding.FlushContext.FlushMode
 
Field Summary
 boolean inProgress
          [OUT] Indicates whether the flush was scheduled for asynchronous completion.
 Exception status
          [OUT] Contains the status of the flush completion.
 boolean syncComplete
          [OUT] Indicates whether the flush completed synchronously or not.
 
Fields inherited from class com.neeve.sma.MessageBusBinding.FlushContext
flushMode
 
Constructor Summary
MessageBusBinding.AsynchronousFlushContext()
          Constructor using a dispatcher.
 
Method Summary
 MessageBusBinding.FlushContext reset()
          Implementation of MessageBusBinding.FlushContext.reset()
 String toString()
          String representation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

inProgress

public boolean inProgress
[OUT] Indicates whether the flush was scheduled for asynchronous completion.

Upon return from the send or flush method, this flag will be set in case the method attempted the flush, could not complete it synchronously and has scheduled it for background completion. This flag remains set until the flush completes at which point the flag is reset and a flush completion event dispatched to the user.


syncComplete

public boolean syncComplete
[OUT] Indicates whether the flush completed synchronously or not.

Upon return from the send or flush method, this flag will be set if the method flushed the binding and the flush completed synchronously. If set to false, it indicates that either the flush was not initiated or was initiated and is completing asynchronously. The user can differentiate between these two cases by inspecting the inProgress flag. The inProgress flag will be set in the latter case. This flag is always set to false when the flush completion event is dispatched.


status

public Exception status
[OUT] Contains the status of the flush completion.

Constructor Detail

MessageBusBinding.AsynchronousFlushContext

public MessageBusBinding.AsynchronousFlushContext()
Constructor using a dispatcher.

Method Detail

reset

public final MessageBusBinding.FlushContext reset()
Implementation of MessageBusBinding.FlushContext.reset()

Specified by:
reset in class MessageBusBinding.FlushContext

toString

public final String toString()
String representation.

Overrides:
toString in class MessageBusBinding.FlushContext


Copyright © 2016 Neeve Research, LLC. All Rights Reserved.