|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MessageSender
Interface for sending messages in a Topic Oriented Applications.
In topic oriented applications, service definitions bind message types
to MessageChannel
that encapsulate the topics on which
messages are transported by default.
The MessageSender
interface provides methods that lookup up the channel associated with a given
message type as defined by the application's service definitions. Additionally
it provides sendMessage variants allowing the caller to override the topic
and provide a customized key resolution table for resolving dynamic portions
of the channel key.
NOTE:
A MessageSender
may be backed by one and only one TopicOrientedApplication
and is tied to that application's lifecycle and transaction context. Applications
that send outbound messages via a MessageSender
as the result of processing
an inbound message must have received the message from the same AepEngine
that
backs the MessageSender
's TopicOrientedApplication
, failure to do so
would break the atomicity guarantees of inbound/outbound message and can in
certain situations lead to deadlocks.
Threading
Implementations of this class are not thread safe. Send calls may only be
called from an EventHandler
that originates from the AepEngine
that backs
the TopicOrientedApplication
from whence this MessageSender came, or in a non concurrent
fashion by an unsolicited 'sender' thread if this is a purely producer application.
AepEngine.sendMessage(MessageChannel, IRogMessage)
,
AepEngine
,
TopicOrientedApplication
,
MessageChannel
Method Summary | |
---|---|
void |
sendMessage(IRogMessage message)
Sends a message using the message's default channel. |
void |
sendMessage(IRogMessage message,
MessageChannel.RawKeyResolutionTable rawKeyResolutionTable)
Sends a message using the provide zero garbage key resolution table. |
void |
sendMessage(IRogMessage message,
Properties keyResolutionTable)
Sends a message using the provided key resolution table. |
void |
sendMessage(IRogMessage message,
String topic)
Sends a message using the given topic as the channel key. |
void |
sendMessage(IRogMessage message,
XString topic)
Sends a message using the given topic as the channel key (zero garbage variant). |
Method Detail |
---|
void sendMessage(IRogMessage message)
AepEngine.sendMessage(MessageChannel, IRogMessage)
,
with the message channel resolved based on this application's service definition for the message type and the provided message.
message
- The message to send.AepEngine.sendMessage(MessageChannel, IRogMessage)
void sendMessage(IRogMessage message, String topic)
AepEngine.sendMessage(MessageChannel, IRogMessage, String, Properties)
,
with the message channel resolved based on this application's service definition for the message type, the provided message, the provided
topic as the channel key, and no key resolution table.
message
- The message to send.AepEngine.sendMessage(MessageChannel, IRogMessage)
void sendMessage(IRogMessage message, Properties keyResolutionTable)
AepEngine.sendMessage(MessageChannel, IRogMessage, Properties)
,
with the message channel resolved based on this application's service definition for the message type, the provided message,
key, and the provided message key.
message
- The message to send.AepEngine.sendMessage(MessageChannel, IRogMessage)
void sendMessage(IRogMessage message, XString topic)
AepEngine.sendMessage(MessageChannel, IRogMessage, XString, MessageChannel.RawKeyResolutionTable)
,
with the message channel resolved based on this application's service definition for the message type, the provided message, the provided
topic as the channel key, and no key resolution table.
message
- The message to send.AepEngine.sendMessage(MessageChannel, IRogMessage)
void sendMessage(IRogMessage message, MessageChannel.RawKeyResolutionTable rawKeyResolutionTable)
AepEngine.sendMessage(MessageChannel, IRogMessage, MessageChannel.RawKeyResolutionTable)
,
with the message channel resolved based on this application's service definition for the message type, the provided message,
and no key resolution table.
message
- The message to send.AepEngine.sendMessage(MessageChannel, IRogMessage)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |