ABLE 2.0.0 07/02/2003 10:25:01

com.ibm.able.conversation
Class ConversationSetupForm

java.lang.Object
  |
  +--com.ibm.able.conversation.ConversationSetupForm
All Implemented Interfaces:
MessageForm

public class ConversationSetupForm
extends java.lang.Object
implements MessageForm

This is a MessageForm for messages that contain data for setting up a conversation: i.e., the name, locator, and conversationID of a participant. Used during the ConversationSetup handshake, it offers some predefined strings for the two phases of the handshake (the "request" and "accept" phases).

OLD VERSION -- TO BE DELETED Replaced by com.ibm.able.conversation.JasConversationSetupTransform.

The ConversationSetupForm is used in the setup_cp.xml provided in the examples/datafiles directory


Field Summary
static java.lang.String ACCEPT
           
static java.lang.String REQUEST
           
 
Constructor Summary
ConversationSetupForm()
          Constructor
ConversationSetupForm(java.lang.String newName)
           
 
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.
 javax.agent.AgentName getAgentName()
           
 java.lang.String getConversationID()
           
 java.lang.String getCounterpartAgentName()
           
 java.lang.Object[] getData()
          Returns the constituent data as an array of objects.
 javax.agent.Locator getLocator()
           
 java.lang.String getMessageName()
           
protected  javax.agent.Payload makePayload(javax.agent.AgentName localAgentName, javax.agent.Locator localLocator, java.lang.String localConversationID)
          Internal method that constructs the payload for the constituent data
 boolean parseMessagePayload(javax.agent.Payload payload)
          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 setAgentName(javax.agent.AgentName newName)
           
 void setConversationID(java.lang.String newID)
           
 void setCounterpartAgentName(java.lang.String name)
           
 void setData(java.lang.Object[] newData)
          Sets the constituent data from an array of objects.
 void setLocator(javax.agent.Locator newLocator)
           
 void setMessageName(java.lang.String newName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REQUEST

public static final java.lang.String REQUEST

ACCEPT

public static final java.lang.String ACCEPT
Constructor Detail

ConversationSetupForm

public ConversationSetupForm()
Constructor

ConversationSetupForm

public ConversationSetupForm(java.lang.String newName)
Method Detail

setMessageName

public void setMessageName(java.lang.String newName)

getMessageName

public java.lang.String getMessageName()

setAgentName

public void setAgentName(javax.agent.AgentName newName)

getAgentName

public javax.agent.AgentName getAgentName()

setLocator

public void setLocator(javax.agent.Locator newLocator)

getLocator

public javax.agent.Locator getLocator()

setConversationID

public void setConversationID(java.lang.String newID)

getConversationID

public java.lang.String getConversationID()

setCounterpartAgentName

public void setCounterpartAgentName(java.lang.String name)

getCounterpartAgentName

public java.lang.String getCounterpartAgentName()

makePayload

protected javax.agent.Payload makePayload(javax.agent.AgentName localAgentName,
                                          javax.agent.Locator localLocator,
                                          java.lang.String localConversationID)
Internal method that constructs the payload for the constituent data

formMessagePayload

public javax.agent.Payload formMessagePayload()
                                       throws java.lang.IllegalStateException
Description copied from interface: MessageForm
Creates a message, using constituent data that was stored inside this MessageForm object. If there's something wrong with the data--e.g., if it hasn't been set, or has been set to bad values, throws an IllegalStateException.
Specified by:
formMessagePayload in interface MessageForm
See Also:
MessageForm.formMessagePayload()

parseMessagePayload

public boolean parseMessagePayload(javax.agent.Payload payload)
Description copied from interface: MessageForm
Parses the message into its constituent data, which is (supposed to be) stored inside this message-form object in a type-specific way.
Specified by:
parseMessagePayload in interface MessageForm
See Also:
MessageForm.parseMessagePayload(Payload)

sampleMessagePayload

public javax.agent.Payload sampleMessagePayload()
Description copied from interface: MessageForm
Return a "sample message" showing the format, but with dummy data values. This is inherently limited, because we're not characterizing the range of possible messages. We're only giving one example.
Specified by:
sampleMessagePayload in interface MessageForm
See Also:
MessageForm.sampleMessagePayload()

clearData

public void clearData()
Description copied from interface: MessageForm
Reset the constituent data to null or default values. Does not affect the properties.
Specified by:
clearData in interface MessageForm
See Also:
MessageForm.clearData()

getData

public java.lang.Object[] getData()
Returns the constituent data as an array of objects.

Contents of the array are as follows:

data[0] = (AgentName) agentName

data[1] = (Locator) locator

data[2] = (String) conversationID

Specified by:
getData in interface MessageForm

setData

public void setData(java.lang.Object[] newData)
             throws java.lang.IllegalArgumentException
Sets the constituent data from an array of objects.

Expects the contents of the array to be the same as described in

Specified by:
setData in interface MessageForm
See Also:
getData().

ABLE 2.0.0 07/02/2003 10:25:01

(C) Copyright IBM Corporation 1999, 2003