|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MessageInjector
Defines the interface for injecting messages into a Topic Oriented Applications.
Injection of a message into a TopicOrientedApplication
directly enqueues
the message for processing by the underlying AepEngine
's event multiplexer
similar to how a message received from a message bus would be injected into the
engine.
Threading
AepEngine.multiplexMessage(IRogMessage)
,
AepEngine.multiplexMessage(IRogMessage, boolean)
,
AepEngine
,
TopicOrientedApplication
Method Summary | |
---|---|
void |
injectMessage(IRogMessage message)
Enqueue a message into an application's AepEngine 's event multiplexer. |
void |
injectMessage(IRogMessage message,
boolean nonBlocking)
Enqueue a message into an application's AepEngine 's event multiplexer. |
void |
injectMessage(IRogMessage message,
boolean nonBlocking,
int delay)
Enqueue a message into an application's AepEngine 's event multiplexer. |
Method Detail |
---|
void injectMessage(IRogMessage message)
AepEngine
's event multiplexer.
This method is the same as injectMessage(IRogMessage, boolean)
with
a value of false for nonBlocking.
message
- The message to enqueue.void injectMessage(IRogMessage message, boolean nonBlocking)
AepEngine
's event multiplexer.
This method is the same as injectMessage(IRogMessage, boolean)
with
a value of false for nonBlocking and a delay of 0.
message
- The message to enqueue.void injectMessage(IRogMessage message, boolean nonBlocking, int delay)
AepEngine
's event multiplexer.
This method enqueues a message into an engine's event multiplexer event loop and returns to the caller. The message is then dispatched subsequently using the normal message dispatch mechanisms.
AepEngine.waitForMessagingToStart()
to avoid
an injected message being discarded while an engine is transitioning to a started,
primary role.
It is important to note that message injection is thus effectively a BestEffor
operation because injections of message that are in the event multiplexer queue
at the time of failure will be lost
IRogNode.dispose()
on the message once it has been dispatched,
so an application must call MessageView.acquire()
if it will hold on to
a (read-only) reference to the message.
message
- The IRogMessage to enqueue.nonBlocking
- Indicates whether the multiplexing should be a
non-blocking action or not. If blocking, then the calling thread
will block if the main multiplexer queue is full and wait until
space is available. If non-blocking, then the method will not
wait but rather enque the message in a multiplexer feeder queue
and return.delay
- The delay in milliseconds at which the message should be injected.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |