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

com.ibm.able.conversation
Class AutoConversationSetup

java.lang.Object
  |
  +--com.ibm.able.AbleObject
        |
        +--com.ibm.able.conversation.AutoConversationSetup
All Implemented Interfaces:
AbleBean, AbleDataBufferManager, AbleEventListener, AbleEventListenerManager, AbleEventQueueManager, AbleEventQueueProcessor, AblePropertyChangeManager, AbleSerializable, java.io.Serializable

public class AutoConversationSetup
extends AbleObject
implements java.io.Serializable

This bean handles setting up conversations based on the setup_cp.xml and metaconversation_cp.xml provided with the ABLE distribution in examples/datafiles. The default conversation is assumed to be setup_cp.xml which then uses metaconverastion_cp.xml to decide the toles to be assumed duting the conversation.

OLD VERSION -- TO BE DELETED

Whenever an AutoConversationSetupBean is used inside an ABLE Jas Conversation agent, the conversationSetup and metaCConversation functions can be set using the conversation agent's decision panel to be the end points for decision making for ConversationSetup and MetaConversation policies respectively

See Also:
Serialized Form

Field Summary
protected static long serialVersionUID
          Serialized version identifier in form YYYYMMDDVerRelModxx
 
Fields inherited from class com.ibm.able.AbleObject
changed, chgSupport, comment, dataFlowEnabled, defaultName, destBufferConnections, eventQueue, fileName, inputBuffer, listeners, logger, name, outputBuffer, parent, propertyConnectionMgr, sourceBufferConnections, state, stateChgSupport, trace
 
Constructor Summary
AutoConversationSetup()
          Constructor for AutoConversationSetupBean
AutoConversationSetup(java.lang.String theName)
          Constructor for AutoConversationSetupBean
AutoConversationSetup(java.lang.String theName, java.lang.String theComment)
          Constructor for AutoConversationSetupBean
 
Method Summary
 java.lang.Object[] conversationSetup(java.lang.String conversationId, java.lang.String decisionPoint, java.lang.Object[] decisionPointData)
          Decision logic connection function for the ConversationSetup CP.
 java.util.Vector getAgentNames()
          Returns a vector of valid agent names to accept conversation requests from
 java.util.Hashtable getRoles()
          Returns the valid roles the agent can assume during conversations
 void init()
          Initialize and configure the bean.
 java.lang.Object[] metaConversation(java.lang.String conversationId, java.lang.String decisionPoint, java.lang.Object[] decisionPointData)
          Decision logic connection function for the ConversationSetup CP.
 void setAgentNames(java.util.Vector agentNames)
          Sets the valid agent names to accept conersation requests from
 void setRoles(java.util.Hashtable roles)
          Set the valid roles the agent can assum during conversations
 
Methods inherited from class com.ibm.able.AbleObject
addAbleEventListener, addDestBufferConnection, addPropertyChangeListener, addPropertyConnection, addSourceBufferConnection, addStateChangeListener, Copyright, dataChanged, firePropertyChange, flushAbleEventQueue, getAbleEventListeners, getAbleEventProcessingEnabled, getAbleEventQueueSize, getComment, getDestBufferConnections, getFileName, getInputBuffer, getInputBuffer, getInputBufferAsStringArray, getInputBufferContents, getLogger, getName, getOutputBuffer, getOutputBuffer, getOutputBufferAsStringArray, getOutputBufferContents, getParent, getPropertyConnectionManager, getSleepTime, getSourceBufferConnections, getState, getTraceLogger, handleAbleEvent, hasInputBuffer, hasOutputBuffer, init, isAbleEventPostingEnabled, isAbleEventProcessingEnabled, isChanged, isConnectable, isDataFlowEnabled, isTimerEventProcessingEnabled, notifyAbleEventListeners, process, process, processAbleEvent, processBufferConnections, processNoEventProcessingEnabledSituation, processTimerEvent, quitAll, quitEnabledEventProcessing, removeAbleEventListener, removeAllAbleEventListeners, removeAllBufferConnections, removeAllConnections, removeAllPropertyConnections, removeDestBufferConnection, removePropertyChangeListener, removePropertyConnection, removeSourceBufferConnection, removeStateChangeListener, reset, restartEnabledEventProcessing, restoreFromFile, restoreFromFile, restoreFromSerializedFile, restoreFromStream, resumeAll, resumeEnabledEventProcessing, saveToFile, saveToFile, setAbleEventProcessingEnabled, setChanged, setComment, setDataFlowEnabled, setFileName, setInputBuffer, setInputBuffer, setLogger, setName, setOutputBuffer, setOutputBuffer, setParent, setSleepTime, setState, setTimerEventProcessingEnabled, setTraceLogger, sourceConnectionsOK, startEnabledEventProcessing, suspendAll, suspendEnabledEventProcessing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

protected static final long serialVersionUID
Serialized version identifier in form YYYYMMDDVerRelModxx
Constructor Detail

AutoConversationSetup

public AutoConversationSetup()
                      throws java.rmi.RemoteException
Constructor for AutoConversationSetupBean

AutoConversationSetup

public AutoConversationSetup(java.lang.String theName)
                      throws java.rmi.RemoteException
Constructor for AutoConversationSetupBean

AutoConversationSetup

public AutoConversationSetup(java.lang.String theName,
                             java.lang.String theComment)
                      throws java.rmi.RemoteException
Constructor for AutoConversationSetupBean
Method Detail

init

public void init()
          throws AbleException
Description copied from class: AbleObject
Initialize and configure the bean. The bean's state changes to AbleState.Initiated or AbleState.Waiting. If either the AbleEventProcessing or TimerEventProcessing flags are enabled, this method calls AbleObject.startEnabledEventProcessing() to start a new thread for asynchronous or timer event processing.

An AbleProperty.ProcessingState PropertyChangeEvent is fired.

Beans overriding this method should call super.init() after any customization and before returning so that the thread is started if needed and the PropertyChangeEvent is fired.

Overrides:
init in class AbleObject
See Also:
AbleObject.init()

getAgentNames

public java.util.Vector getAgentNames()
Returns a vector of valid agent names to accept conversation requests from

Returns:
vector of string names of agents

setAgentNames

public void setAgentNames(java.util.Vector agentNames)
Sets the valid agent names to accept conersation requests from

Parameters:
agentNames - Vector of string names of agents

getRoles

public java.util.Hashtable getRoles()
Returns the valid roles the agent can assume during conversations

Returns:
a hashtable indexed by the policy name with the corresponding value containing a vector of valid roles

setRoles

public void setRoles(java.util.Hashtable roles)
Set the valid roles the agent can assum during conversations

Parameters:
roles - a hashtable indexed by the policy name with the corresponding value containing a vector of valid roles

conversationSetup

public java.lang.Object[] conversationSetup(java.lang.String conversationId,
                                            java.lang.String decisionPoint,
                                            java.lang.Object[] decisionPointData)
Decision logic connection function for the ConversationSetup CP.

Parameters:
conversationId - the conversation identifier

decisionPoint - the decicion point (state name) at which a deicision is to be made

decisionData - object array representing the data used in making a decision

Returns:
an object array, with the first element of the array representing the decision made and the second parameter itself an object array that is to be used to construct the message form for an outgoing message

metaConversation

public java.lang.Object[] metaConversation(java.lang.String conversationId,
                                           java.lang.String decisionPoint,
                                           java.lang.Object[] decisionPointData)
Decision logic connection function for the ConversationSetup CP.

Parameters:
conversationId - the conversation identifier

decisionPoint - the decicion point (state name) at which a deicision is to be made

decisionData - object array representing the data used in making a decision

Returns:
an object array, with the first element of the array representing the decision made and the second parameter itself an object array that is to be used to construct the message form for an outgoing message

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

(C) Copyright IBM Corporation 1999, 2003