public static final class MessageBusBinding.AsynchronousFlushContext extends MessageBusBinding.FlushContext
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.
MessageBusBinding.FlushContext.FlushMode
Modifier and Type | Field and Description |
---|---|
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.
|
flushMode
Constructor and Description |
---|
MessageBusBinding.AsynchronousFlushContext()
Constructor using a dispatcher.
|
Modifier and Type | Method and Description |
---|---|
MessageBusBinding.FlushContext |
reset()
Implementation of
MessageBusBinding.FlushContext.reset() |
String |
toString()
String representation.
|
public boolean inProgress
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.
public boolean syncComplete
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.
public Exception status
public MessageBusBinding.AsynchronousFlushContext()
public final MessageBusBinding.FlushContext reset()
MessageBusBinding.FlushContext.reset()
reset
in class MessageBusBinding.FlushContext
public final String toString()
toString
in class MessageBusBinding.FlushContext
Copyright © 2019 Neeve Research, LLC. All Rights Reserved.