|
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 |
java.lang.Object | +--com.ibm.able.conversation.TextMessageForm
This is a MessageForm for messages with two String-valued elements, "name" and "text".
The "name" is considered a property of this MessageForm, while the "text" is considered
the constituent data.
The name may be used in either of two ways:
1. "free": when parsing, the name is extracted from the message and discarded. Any non-null
value is acceptible; parse(...) returns true.
2. "fixed": when parsing, the name extracted from the message is tested against the value
stored in this MessageForm. For parsing to be successful, it has to match.
In both cases, the message is formed in the same way.
OLD VERSION -- TO BE DELETED Replaced by com.ibm.able.converstion.JasStringLiteralTransform.
Field Summary | |
---|---|
protected static java.lang.String |
NAME_KEY
|
protected static java.lang.String |
TEXT_KEY
|
Constructor Summary | |
---|---|
TextMessageForm()
Constructors |
|
TextMessageForm(java.lang.String newName)
|
|
TextMessageForm(java.lang.String newName,
boolean newFixed)
|
Method Summary | |
---|---|
void |
clearData()
Sets text to null. |
javax.agent.Payload |
formMessagePayload()
Creates a message, using constituent data that was stored inside this MessageForm object. |
java.lang.Object[] |
getData()
Returns the text, packed into a length-1 array. |
java.lang.String |
getName()
|
java.lang.String |
getText()
|
boolean |
isNameFixed()
|
static void |
main(java.lang.String[] args)
For testing only. |
protected javax.agent.Payload |
makePayload(java.lang.String localName,
java.lang.String localText)
|
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)
Tries to set the text. |
void |
setName(java.lang.String newName)
|
void |
setNameFixed(boolean newValue)
|
void |
setText(java.lang.String newText)
|
java.lang.String |
toString()
Here, we print both the properties and the constituent data. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected static final java.lang.String NAME_KEY
protected static final java.lang.String TEXT_KEY
Constructor Detail |
public TextMessageForm()
public TextMessageForm(java.lang.String newName)
public TextMessageForm(java.lang.String newName, boolean newFixed)
Method Detail |
public java.lang.String getName()
public void setName(java.lang.String newName)
public boolean isNameFixed()
public void setNameFixed(boolean newValue)
public java.lang.String getText()
public void setText(java.lang.String newText)
public void setData(java.lang.Object[] data) throws java.lang.IllegalArgumentException
setData
in interface MessageForm
data
- Length-1 array containing a String as its firstr (and only) element.public java.lang.Object[] getData()
getData
in interface MessageForm
public void clearData()
clearData
in interface MessageForm
protected javax.agent.Payload makePayload(java.lang.String localName, java.lang.String localText)
public javax.agent.Payload formMessagePayload() throws java.lang.IllegalStateException
MessageForm
formMessagePayload
in interface MessageForm
MessageForm.formMessagePayload()
public javax.agent.Payload sampleMessagePayload()
MessageForm
sampleMessagePayload
in interface MessageForm
MessageForm.sampleMessagePayload()
public boolean parseMessagePayload(javax.agent.Payload messagePayload)
MessageForm
parseMessagePayload
in interface MessageForm
MessageForm.parseMessagePayload(Payload)
public java.lang.String toString()
toString
in class java.lang.Object
public static void main(java.lang.String[] args)
|
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 |