|
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.examples.conversation.AmabSelectionMessageForm
This class represents the message-form used during the AMAB Conversation by the buyer to indicate a selection from the Offer set provided by the seller
MessageForm
,
MessageFormFactory
Field Summary | |
---|---|
protected static java.lang.String |
NAME_KEY
|
protected static java.lang.String |
SELECTION_KEY
|
Constructor Summary | |
---|---|
AmabSelectionMessageForm()
Default Constructor |
|
AmabSelectionMessageForm(java.lang.String newName)
Single Argument Constructor - as required by the MessageFormFactory |
Method Summary | |
---|---|
void |
clearData()
Sets selection to zero. |
javax.agent.Payload |
formMessagePayload()
Creates a message, using constituent data that was stored inside this MessageForm object. |
java.lang.Object[] |
getData()
Returns the selection, packed into a length-1 array. |
java.lang.String |
getName()
Return the name |
int |
getSelection()
Return the selection value |
protected javax.agent.Payload |
makePayload(java.lang.String localName,
java.lang.Integer i)
internal function to create a payload for contituent data |
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 selection |
void |
setName(java.lang.String newName)
Set the name of the Selection Message |
void |
setSelection(int selection)
Set the selection value |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final java.lang.String NAME_KEY
protected static final java.lang.String SELECTION_KEY
Constructor Detail |
public AmabSelectionMessageForm()
public AmabSelectionMessageForm(java.lang.String newName)
Method Detail |
public java.lang.String getName()
public void setName(java.lang.String newName)
newName
- the namepublic int getSelection()
public void setSelection(int selection)
selection
- the actual selection valuepublic void setData(java.lang.Object[] data) throws java.lang.IllegalArgumentException
setData
in interface MessageForm
data
- Length-1 array containing an Integer as its first (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.Integer i)
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)
|
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 |