|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Classes that implement this interface are used to assemble and disassemble TransportMessages, converting them to & from strongly-typed objects (the "constituent data") which are defined by the particular MessageForm class itself.
OLD VERSION -- TO BE DELETED Replaced by com.ibm.conversation.MessageTransform.
Many MessageForm classes will have user-configurable properties, which help determine the way the MessageForm converts between messages and constituent data. Properties are not to be confused with the constituent data, and are not involved in the getData/setData methods.
It's up to the MessageForm designer to decide what should be a property, and what should be part of the constituent data.
Intended usage is as follows:
1. For converting data into a message
1a. Set the by calling setData(...) or by calling class-specific property-
setters (e.g., mySpecialMessageForm.setPrice(99.98), etc.)
1b. invoke the form() method. E.g.,
TransportMessage myMessage = mySpecialMessageForm.form();
2. For converting a message into data
2a. Invoke parse(...) method. E.g.,
boolean isParsed = mySpecialMessageForm.parse(theMessage);
2b. Get the data by calling getData(...) or by calling class-specific
property-getters (e.g., double thePrice = mySpecialMessageForm.getPrice(),
etc.)
TO DO: This should form & parse javax.agent.Payload, not TransportMessage.
Method Summary | |
---|---|
void |
clearData()
Reset the constituent data to null or default values. |
javax.agent.Payload |
formMessagePayload()
Creates a message, using constituent data that was stored inside this MessageForm object. |
java.lang.Object[] |
getData()
Package & return the constituent data in the form of an array of Objects. |
boolean |
parseMessagePayload(javax.agent.Payload messagePayload)
Parses the message into its constituent data, which is (supposed to be) stored inside this message-form object in a type-specific way. |
javax.agent.Payload |
sampleMessagePayload()
Return a "sample message" showing the format, but with dummy data values. |
void |
setData(java.lang.Object[] data)
Try to set the constituent data by means of the supplied arguments. |
Method Detail |
public boolean parseMessagePayload(javax.agent.Payload messagePayload)
public javax.agent.Payload formMessagePayload() throws java.lang.IllegalStateException
public javax.agent.Payload sampleMessagePayload()
public void setData(java.lang.Object[] data) throws java.lang.IllegalArgumentException
public java.lang.Object[] getData()
public void clearData()
|
ABLE 2.0.0 07/02/2003 10:25:01 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |