|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.ibm.able.conversation.AbleOwned
com.ibm.able.conversation.AblePlatformMessageSystemAdapter
The AblePlatformMessageSystemAdapter class is a MessageSystemAdapter that uses Java Agent Services (JAS) messaging.
It also contains a reference to an AbleBean--its putative owner--which it uses for logging and trace-logging.
In order for this MessageSystemAdapter to work, it must be initialized with a working JAS transport service.
MessageTransportService| Field Summary | |
|---|---|
static java.lang.String |
RECIPIENT_CONVERSATION_ID
Key under which the sender of a message stores the recipient's conversation ID in the message's header. |
static java.lang.String |
SENDER_CONVERSATION_ID
Key under which the sender of a message stores its own conversation ID in the message's header. |
| Constructor Summary | |
|---|---|
AblePlatformMessageSystemAdapter()
Constructs an AbleJasMessageSystemAdapter with null instance variables. |
|
AblePlatformMessageSystemAdapter(AbleBean newOwner)
Constructs an AbleJasMessageSystemAdapter with the given bean as owner. |
|
AblePlatformMessageSystemAdapter(AbleBean newOwner,
javax.agent.service.transport.MessageTransportService newTransport)
Constructs an AbleJasMessageSystemAdapter. |
|
| Method Summary | |
|---|---|
MessageHandle |
createMessage()
Creates and returns an instance of a message of the type that can be delivered by this MessageSystemAdapter. |
protected javax.agent.TransportMessage |
createTransportMessage(ConversationMetaData metaData,
MessageHandle mh)
Creates a TransportMessage out of the given MetaData and MessageHandle. |
javax.agent.service.transport.MessageTransportService |
getTransportService()
Returns the MessageTransportService used in delivering messages. |
protected void |
initEnvelope(com.ibm.conversation.jas.JasConversationMetaData jasMetaData,
org.jagent.acr.AcrEnvelope envelope)
Initializes a message's envelope. |
static MessageHandle |
makeMessageHandle(javax.agent.TransportMessage msg)
Converts a TransportMessage (created by the JAS subsystem) into a MessageHandle. |
static java.lang.String |
parseConversationId(javax.agent.TransportMessage msg)
Extracts the recipient's conversation ID from the given message's header. |
void |
sendMessage(Conversation conv,
MessageHandle mh)
Undertakes to deliver the given message. |
void |
setTransportService(javax.agent.service.transport.MessageTransportService svc)
Sets the MessageTransportService used in delivering messages. |
| Methods inherited from class com.ibm.able.conversation.AbleOwned |
|---|
getAbleOwner, logException, logMessage, setAbleOwner |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String SENDER_CONVERSATION_ID
public static final java.lang.String RECIPIENT_CONVERSATION_ID
| Constructor Detail |
public AblePlatformMessageSystemAdapter()
null instance variables.
The transport service must be set (via setTransportService()) before this
MessageSystemAdapter can be used.
public AblePlatformMessageSystemAdapter(AbleBean newOwner)
The transport service must be set (via setTransportService()) before this
MessageSystemAdapter can be used.
newOwner - The AbleBean that "owns" this MessageSystemAdapter.
public AblePlatformMessageSystemAdapter(AbleBean newOwner,
javax.agent.service.transport.MessageTransportService newTransport)
newOwner - The AbleBean that "owns" this MessageSystemAdapter.newTransport - The MessageTransportService to use in delivering messages.| Method Detail |
public javax.agent.service.transport.MessageTransportService getTransportService()
public void setTransportService(javax.agent.service.transport.MessageTransportService svc)
svc - The MessageTransportService to use in delivering messages.public static java.lang.String parseConversationId(javax.agent.TransportMessage msg)
msg - the message from which to extract the conversation id.
public static MessageHandle makeMessageHandle(javax.agent.TransportMessage msg)
For JAS-based messaging, the MessageHandle contains the payload. So this extracts the payload and copies it into the MessageHandle.
msg - The TransportMessage to be converted.
public MessageHandle createMessage()
MessageSystemAdapter
createMessage in interface MessageSystemAdapter
public void sendMessage(Conversation conv,
MessageHandle mh)
MessageSystemAdapter
sendMessage in interface MessageSystemAdapterconv - The Conversation associated with this message.mh - The message to be delivered.
protected javax.agent.TransportMessage createTransportMessage(ConversationMetaData metaData,
MessageHandle mh)
In JAS-based messaging, the MessageHandle contains a Payload. So this creates a new TransportMessage and puts the Payload into it. Also initializes the message envelope, so that the TransportMessage is ready for delivery..
metaData - The ConversationMetaData for the conversation this message is a part of.mh - The message to convert into a TransportMessage
protected void initEnvelope(com.ibm.conversation.jas.JasConversationMetaData jasMetaData,
org.jagent.acr.AcrEnvelope envelope)
Called by createTransportMessage().
Fills in the message's header: Adds sender & recipient conversation IDs, locators
and names.
jasMetaData - The conversation meta-data containing the info to put into the envelope.envelope - The envelope to initialize.
|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||