ABLE 2.3.0 07/13/2005 14:21:00

com.ibm.able.conversation
Class AblePlatformConversationAgent

java.lang.Object
  extended bycom.ibm.able.AbleObject
      extended bycom.ibm.able.AbleDefaultAgent
          extended bycom.ibm.able.AbleRemoteDefaultAgent
              extended bycom.ibm.able.platform.AblePlatformDefaultAgent
                  extended bycom.ibm.able.conversation.AblePlatformConversationAgent
All Implemented Interfaces:
AbleAgent, AbleBean, AbleBeanContainer, AbleBeanRemoteContainer, AbleDataBufferManager, AbleEventListener, AbleEventListenerManager, AbleEventListenerRemoteManager, AbleEventQueueManager, AbleEventQueueProcessor, AbleEventQueueRemoteManager, AblePlatformAgent, AblePropertyChangeManager, AbleRemoteAgent, AbleRemoteBean, AbleRemoteEventListener, AbleSerializable, AbleUserDefinedFunctionManager, AbleUserDefinedFunctionRemoteManager, java.util.EventListener, javax.agent.service.transport.MessageListener, java.beans.PropertyChangeListener, java.rmi.Remote, java.io.Serializable
Direct Known Subclasses:
ChatterboxAgent, ChatterboxAgent2

public class AblePlatformConversationAgent
extends AblePlatformDefaultAgent

The AblePlatformConversationAgent class represents an agent that supports conversations atop the Able Distributed Agent Platform.

See Also:
Serialized Form

Field Summary
protected  AbleConversationManager conversationManager
          The manager for this agent's conversations.
static java.lang.String CP_REPOSITORY_PATH_PROPERTY
          Key to use when looking up or storing CP repository path in the System properties table.
protected  AbleRemoteUdfDecisionLogicAdapter decisionLogicAdapter
          The decision logic adapter for all of this agent's conversations.
protected  AblePlatformMessageSystemAdapter messageSystemAdapter
          The message-system adapter used in all this agent's outbound JAS messages.
static java.lang.String PREFERRED_LOCATOR_TYPE
          The type of Locator we look for in an agent's description, when we want to send a message to that agent.
protected static long serialVersionUID
          Serialized version identifier in form YYYYMMDDVerRelModxx
 
Fields inherited from class com.ibm.able.platform.AblePlatformDefaultAgent
agentLastUpdate, agentMovable, agentStatus, agentSummary, agentToAutoRegister, agentToBindToRmi, agentType, agentVendor, agentVersion, myAgentInboxes, myAgentLoggingService, myCapabilities, myCapabilityOrder, myCustomCapabilityAutonomyLevels, myHighCapabilityAutonomyLevels, myJasAbleLocator, myJasAgentAttributes, myJasAgentDescription, myJasAgentDirectoryService, myJasAgentName, myJasAgentNamingService, myJasDefaultLocator, myJasMessageTransportService, myJasServiceRoot, myJasTransportSystem, myJasVerifiableDirectoryService, myJasVerifiableNamingService, myKeyPair, myLowCapabilityAutonomyLevels, myMediumCapabilityAutonomyLevels, myPrincipal, myReceiveMessageMethod, myRequestKey, mySecSppt, myTrustLevel, myVerifiableAgentName
 
Fields inherited from class com.ibm.able.AbleRemoteDefaultAgent
agentAddr, agentHost, agentName, defaultName, myRemoteStub
 
Fields inherited from class com.ibm.able.AbleDefaultAgent
activeDataSource, eventConnections, myBeans, numEpochs, processList, processListOK, userDefinedFunctions
 
Fields inherited from class com.ibm.able.AbleObject
changed, chgSupport, comment, dataFlowEnabled, destBufferConnections, eventQueue, fileName, inputBuffer, listeners, logger, name, outputBuffer, parent, properties, propertyConnectionMgr, sourceBufferConnections, state, stateChgSupport, trace
 
Constructor Summary
AblePlatformConversationAgent()
          Constructs an AblePlatformConversationAgent object.
AblePlatformConversationAgent(java.lang.String instanceName)
          Constructs an AblePlatformConversationAgent object.
 
Method Summary
protected  com.ibm.conversation.jas.JasConversationMetaData createMetaData()
          Creates and returns a ConversationMetaData object compatible with this agent's messaging system, for use in creating a new Conversation.
 ConversationManager getConversationManager()
          Returns this agent's conversation manager.
static javax.agent.Locator getLocatorForInbox(javax.agent.service.directory.AgentDescription agentDesc, java.lang.String inboxName)
          Searches the given AgentDescription for a Locator with the given inbox name, and returns the first one found.
static javax.agent.Locator getLocatorForType(javax.agent.service.directory.AgentDescription agentDesc, java.lang.String desiredType)
          Extracts and returns a Locator of the given type from the given AgentDescription.
 java.lang.String getPartnerRole(java.lang.String policyName, java.lang.String selfRole)
          Returns the role taken by an agent's partner in the given CP, if the agent is taking the given role.
 void init()
          Initializes this agent.
 void installTargetForCp(java.lang.String cpName, java.lang.String role, java.lang.Object target)
          This configures this agent so that the given target will be used for all inbound decision callbacks associated with the given policy & role.
protected  void logException(java.lang.String theMethodName, java.lang.Exception theException)
          Logs an exception with the agent's name in the message text.
protected  void logMessage(long msgType, java.lang.String theMethodName, java.lang.String theMessage)
          Logs a message that includes the agent name in the message text.
 void onInboundDecision(Conversation conv, DecisionDataHandle ddh)
          Writes a log entry stating that an inbound message was successfully converted to inbound decision-data.
 void onMessage(javax.agent.TransportMessage msg)
          Receives a message.
 void onTimeout(Conversation conv, java.lang.String newState)
          Writes a log entry stating that a timeout occurred during a conversation.
 void onUnexpectedMessage(Conversation conv, MessageHandle mh)
          Writes a log entry stating that an unexpected message was received during a conversation.
 void process()
          Does one step of processing.
 void startConversation(javax.agent.service.directory.AgentDescription partnerDesc, java.lang.String rootPolicyName, java.lang.String selfRole)
          Initiates a conversation with the agent with the given AgentDescription.
 void startConversation(javax.agent.AgentName partnerAgentName, javax.agent.Locator partnerLocator, java.lang.String rootPolicyName, java.lang.String selfRole)
          Initiates a conversation with an agent.
 void startConversation(javax.agent.AgentName partnerAgentName, java.lang.String rootPolicyName, java.lang.String selfRole)
          Attempts to initiate a conversation with the agent with the given AgentName.
 void startConversation(java.lang.String partnerDisplayName, java.lang.String rootPolicyName, java.lang.String selfRole)
          Attempts to initiate a conversation with the agent with the given display name.
 
Methods inherited from class com.ibm.able.platform.AblePlatformDefaultAgent
_init, _init, _quitAll, _reset, _resumeAll, _suspendAll, addAgentInbox, addJasAgentAttribute, authenticateAndAuthorizeCaller, authorizeCapabilityChangeRequest, broadcastTransportMessage, createAgentSituationReport, createLocatorAndBindToMethod, getAboutDataBean, getAgentAutonomyLevel, getAgentDescription, getAgentInboxes, getAgentLastUpdate, getAgentLoggingService, getAgentStatus, getAgentSummary, getAgentType, getAgentVendor, getAgentVersion, getAndSetAgentDescription, getAndSetAgentNames, getAndSetTransportServices, getAndValidateServiceRoot, getCapabilities, getCapability, getCapabilityAutonomyLevels, getCapabilityOrder, getCapabilityPresets, getCapabilitySummaryByAgentAutonomyLevel, getCapabilitySummaryByCapabilityAutonomyLevels, getCustomizerDataBean, getCustomizerInfo, getJasAgentAttributes, getJasAgentName, getNewAgentDescription, getPlatformAgentName, getPrincipal, getTransportMessageContent, getTransportMessageContent2, handleAnsweredRequest, init, initAgentCapabilities, initCommonCode, initializeAgent, initializeAgent, isAgentMovable, isAgentToAutoRegister, isAgentToBindToRmi, loadAgentDescriptionWithAbleAttributes, loadAgentDescriptionWithAbleLocator, loadAgentDescriptionWithAgentName, loadAgentDescriptionWithBaseLocators, loadAgentDescriptionWithPublicKey, loadAgentDescriptionWithUserAttributes, logAgentSituationReport, logHistory, lookUpAgent, lookUpAgent, main, makeCapabilityAutonomyLevelsSummary, maybeDeregisterWithAgentDirectoryService, maybeRebindToRmi, maybeRegisterWithAgentDirectoryService, maybeUnbindFromRmi, preInit, preInit, process, processAnsweredRequest, quitAgent, quitAll, receiveMessage, removeAgentInbox, removeAgentInboxes, removeAgentSituationReports, removeJasAgentAttribute, reset, resetAgent, resumeAgent, resumeAll, sendTransportMessage, sendTransportMessage, setAgentAutonomyLevel, setAgentMovable, setAgentNameUniqueID, setAgentSummary, setAgentToAutoRegister, setAgentToBindToRmi, setAgentType, setAgentVendor, setAgentVersion, setCapabilityAutonomyLevel, setCapabilityAutonomyLevels, setCustomizerDataBean, setPrincipal, setRequestKey, setRestartedFromPersistence, suspendAgent, suspendAll, toString, updateAgentSituationReport, updateDescriptionWithAgentDirectoryService, validateAnsweredRequest, verifyCapabilities, verifyKey
 
Methods inherited from class com.ibm.able.AbleRemoteDefaultAgent
getAgentAddr, getAgentHost, getAgentName, rmiRebind, rmiUnbind
 
Methods inherited from class com.ibm.able.AbleDefaultAgent
addBean, addBeans, addEventConnection, addUserDefinedFunction, buildProcessList, clsNm, containsBean, containsBean, containsUserDefinedFunction, debugTrace, generateUniqueName, getBean, getBeans, getDataSource, getEventConnections, getNumEpochs, getProcessList, getUserDefinedFunction, getUserDefinedFunctions, handleAbleEvent, initAllBeans, invokeUserDefinedFunction, isActiveDataSource, propertyChange, quitEnabledEventProcessing, removeAllBeans, removeAllConnections, removeAllEventConnections, removeBean, removeBean, removeBeans, removeEventConnection, removeUserDefinedFunction, resetAllBeans, setActiveDataSource, setDataFlowEnabled, setProcessList, setUserDefinedFunctions
 
Methods inherited from class com.ibm.able.AbleObject
addAbleEventListener, addDestBufferConnection, addPropertyChangeListener, addPropertyConnection, addSourceBufferConnection, addStateChangeListener, dataChanged, firePropertyChange, flushAbleEventQueue, getAbleEventListeners, getAbleEventProcessingEnabled, getAbleEventQueueSize, getComment, getDestBufferConnections, getFileName, getInputBuffer, getInputBuffer, getInputBufferAsString, getInputBufferAsStringArray, getInputBufferContents, getLogger, getName, getOutputBuffer, getOutputBuffer, getOutputBufferAsString, getOutputBufferAsStringArray, getOutputBufferContents, getParent, getProperties, getProperty, getPropertyChangeListeners, getPropertyConnectionManager, getSleepTime, getSourceBufferConnections, getState, getTraceLogger, hasInputBuffer, hasOutputBuffer, isAbleEventPostingEnabled, isAbleEventProcessingEnabled, isChanged, isConnectable, isDataFlowEnabled, isTimerEventProcessingEnabled, notifyAbleEventListeners, processAbleEvent, processBufferConnections, processNoEventProcessingEnabledSituation, processTimerEvent, removeAbleEventListener, removeAllAbleEventListeners, removeAllBufferConnections, removeAllPropertyConnections, removeDestBufferConnection, removeProperty, removePropertyChangeListener, removePropertyConnection, removeSourceBufferConnection, removeStateChangeListener, restartEnabledEventProcessing, restoreFromFile, restoreFromFile, restoreFromSerializedFile, restoreFromStream, resumeEnabledEventProcessing, saveToFile, saveToFile, setAbleEventProcessingEnabled, setChanged, setComment, setFileName, setInputBuffer, setInputBuffer, setLogger, setName, setOutputBuffer, setOutputBuffer, setParent, setProperties, setProperty, setSleepTime, setState, setTimerEventProcessingEnabled, setTraceLogger, sourceConnectionsOK, startEnabledEventProcessing, suspendEnabledEventProcessing
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.able.platform.AblePlatformAgent
getComment
 
Methods inherited from interface com.ibm.able.AbleRemoteAgent
addEventConnection, getAgentAddr, getAgentHost, getAgentName, getDataSource, isActiveDataSource, removeEventConnection, setActiveDataSource
 
Methods inherited from interface com.ibm.able.AbleRemoteBean
getName, getProperties, getProperty, getState, removeProperty, setProperties, setProperty
 
Methods inherited from interface com.ibm.able.AbleRemoteEventListener
handleAbleEvent
 
Methods inherited from interface com.ibm.able.AbleEventListenerRemoteManager
addAbleEventListener, notifyAbleEventListeners, removeAbleEventListener
 
Methods inherited from interface com.ibm.able.AbleEventQueueRemoteManager
flushAbleEventQueue, getAbleEventProcessingEnabled, getAbleEventQueueSize, getSleepTime, isTimerEventProcessingEnabled, quitEnabledEventProcessing, restartEnabledEventProcessing, resumeEnabledEventProcessing, setAbleEventProcessingEnabled, setSleepTime, setTimerEventProcessingEnabled, startEnabledEventProcessing, suspendEnabledEventProcessing
 
Methods inherited from interface com.ibm.able.AbleBeanRemoteContainer
addBean, containsBean, containsBean, getBean, getBeans, removeAllBeans, removeBean, removeBean
 
Methods inherited from interface com.ibm.able.AbleUserDefinedFunctionRemoteManager
addUserDefinedFunction, containsUserDefinedFunction, getUserDefinedFunction, getUserDefinedFunctions, invokeUserDefinedFunction, removeUserDefinedFunction, setUserDefinedFunctions
 
Methods inherited from interface javax.agent.service.transport.MessageListener
equals, hashCode
 
Methods inherited from interface com.ibm.able.AbleBean
getComment, getLogger, getName, getParent, getProperties, getProperty, getState, getTraceLogger, isChanged, removeProperty, setChanged, setComment, setLogger, setName, setParent, setProperties, setProperty, setState, setTraceLogger
 
Methods inherited from interface com.ibm.able.AbleDataBufferManager
addDestBufferConnection, addSourceBufferConnection, getDestBufferConnections, getInputBuffer, getInputBuffer, getInputBufferAsString, getInputBufferAsStringArray, getInputBufferContents, getOutputBuffer, getOutputBuffer, getOutputBufferAsString, getOutputBufferAsStringArray, getOutputBufferContents, getSourceBufferConnections, hasInputBuffer, hasOutputBuffer, isConnectable, isDataFlowEnabled, processBufferConnections, removeAllBufferConnections, removeDestBufferConnection, removeSourceBufferConnection, setInputBuffer, setInputBuffer, setOutputBuffer, setOutputBuffer
 
Methods inherited from interface com.ibm.able.AbleEventListenerManager
addAbleEventListener, dataChanged, getAbleEventListeners, notifyAbleEventListeners, removeAbleEventListener
 
Methods inherited from interface com.ibm.able.AbleEventQueueManager
flushAbleEventQueue, getAbleEventProcessingEnabled, getAbleEventQueueSize, getSleepTime, isAbleEventPostingEnabled, isAbleEventProcessingEnabled, isTimerEventProcessingEnabled, restartEnabledEventProcessing, resumeEnabledEventProcessing, setAbleEventProcessingEnabled, setSleepTime, setTimerEventProcessingEnabled, startEnabledEventProcessing, suspendEnabledEventProcessing
 
Methods inherited from interface com.ibm.able.AbleEventQueueProcessor
processAbleEvent, processNoEventProcessingEnabledSituation, processTimerEvent
 
Methods inherited from interface com.ibm.able.AblePropertyChangeManager
addPropertyChangeListener, addPropertyConnection, getPropertyChangeListeners, getPropertyConnectionManager, removeAllPropertyConnections, removePropertyChangeListener, removePropertyConnection
 
Methods inherited from interface com.ibm.able.AbleSerializable
getFileName, restoreFromFile, restoreFromFile, saveToFile, saveToFile, setFileName
 
Methods inherited from interface com.ibm.able.AbleBeanContainer
getName
 

Field Detail

serialVersionUID

protected static final long serialVersionUID
Serialized version identifier in form YYYYMMDDVerRelModxx

See Also:
Constant Field Values

PREFERRED_LOCATOR_TYPE

public static final java.lang.String PREFERRED_LOCATOR_TYPE
The type of Locator we look for in an agent's description, when we want to send a message to that agent.

See Also:
Constant Field Values

CP_REPOSITORY_PATH_PROPERTY

public static final java.lang.String CP_REPOSITORY_PATH_PROPERTY
Key to use when looking up or storing CP repository path in the System properties table.

See Also:
Constant Field Values

messageSystemAdapter

protected AblePlatformMessageSystemAdapter messageSystemAdapter
The message-system adapter used in all this agent's outbound JAS messages.


conversationManager

protected AbleConversationManager conversationManager
The manager for this agent's conversations.


decisionLogicAdapter

protected AbleRemoteUdfDecisionLogicAdapter decisionLogicAdapter
The decision logic adapter for all of this agent's conversations.

Constructor Detail

AblePlatformConversationAgent

public AblePlatformConversationAgent()
                              throws java.rmi.RemoteException,
                                     AbleException
Constructs an AblePlatformConversationAgent object.


AblePlatformConversationAgent

public AblePlatformConversationAgent(java.lang.String instanceName)
                              throws java.rmi.RemoteException,
                                     AbleException
Constructs an AblePlatformConversationAgent object.

Method Detail

getConversationManager

public ConversationManager getConversationManager()
Returns this agent's conversation manager.

Returns:
The conversation manager.

getPartnerRole

public java.lang.String getPartnerRole(java.lang.String policyName,
                                       java.lang.String selfRole)
Returns the role taken by an agent's partner in the given CP, if the agent is taking the given role. Assumes that there are just two roles to the CP.

Parameters:
policyName - The name of the CP in question
selfRole - The role to find the counterpart of.
Returns:
The role of the counterpart of an agent playing the given role in the given CP, or null if the policy is unknown or the role is undefined.

onMessage

public void onMessage(javax.agent.TransportMessage msg)
Receives a message.

This is the endpoint for all messages coming in through the platform transport service. Routing of the messages to the appropriate Conversation is done based on the conversation ID in the message envelope. If there is no conversation ID, a new Conversation is created, to which it is sent. Thus every message is either part of an already-established conversation, or else the first message of a new conversation to be created.

Parameters:
msg - the message received

createMetaData

protected com.ibm.conversation.jas.JasConversationMetaData createMetaData()
Creates and returns a ConversationMetaData object compatible with this agent's messaging system, for use in creating a new Conversation.

Initializes the self-related parts of it, except for the conversation ID (which is set by the ConversationManager when the conversation is created).


onUnexpectedMessage

public void onUnexpectedMessage(Conversation conv,
                                MessageHandle mh)
Writes a log entry stating that an unexpected message was received during a conversation. The log entry includes the agent name, the conversation ID, the message class type and the current conversation context.

This is the default callback for unexpected messages. Users should replace it with something that does more than just writes a log entry.

Parameters:
conv - The Conversation in which the unexpected message occurred.
mh - The MessageHandle containing the unexpected message.

onTimeout

public void onTimeout(Conversation conv,
                      java.lang.String newState)
Writes a log entry stating that a timeout occurred during a conversation. The log entry includes the agent name, the conversation ID, the conversation context, and the new state reached after the timeout transition is taken.

This is the default callback for timeouts. Users should replace it with something that does more than just writes a log entry.

Parameters:
conv - The Conversation in which the unexpected message occurred.
newState - The conversation state reached as a result of taking the timeout transition.

onInboundDecision

public void onInboundDecision(Conversation conv,
                              DecisionDataHandle ddh)
Writes a log entry stating that an inbound message was successfully converted to inbound decision-data. The entry contains the agent name, the conversation ID, the decision name (which is the name of the new state reached after taking the transition matching the inbound message), and the conversational context.

This is the default callback for inbound decision data. Users should replace it with something that does more than just writes a log entry.

Parameters:
conv - The Conversation in which the unexpected message occurred.
ddh - The DecisionDataHandle containing the decision data.

getLocatorForType

public static javax.agent.Locator getLocatorForType(javax.agent.service.directory.AgentDescription agentDesc,
                                                    java.lang.String desiredType)
Extracts and returns a Locator of the given type from the given AgentDescription.

Parameters:
agentDesc - The AgentDescription in which to look for the Locator
desiredType - The type to look for.
Returns:
The locator with the desired type, or null if none is found.

getLocatorForInbox

public static javax.agent.Locator getLocatorForInbox(javax.agent.service.directory.AgentDescription agentDesc,
                                                     java.lang.String inboxName)
Searches the given AgentDescription for a Locator with the given inbox name, and returns the first one found. Looks for the inbox name under the key stored in com.ibm.able.platform.AblePlatform.AbleLocatorProtocol. Assumes the values associated with that key are of class type String.

Parameters:
agentDesc - The AgentDescription to search.
inboxName - The name of the inbox to search for.
Returns:
The Locator with the given inbox name, or null if not found.

startConversation

public void startConversation(java.lang.String partnerDisplayName,
                              java.lang.String rootPolicyName,
                              java.lang.String selfRole)
Attempts to initiate a conversation with the agent with the given display name. This uses the platform registry to look for the AgentDescription matching the given AgentName. If found, uses that AgentDescription. If not, aborts.

This method must be called in order to start a conversation, but thereafter, all processing is handled via calls to the decision logic invocation targets. In particular, the decision logic will immediately be required to fill in the parameters of the conversation-opener message defined by this agent's initial conversation policy.

Parameters:
partnerDisplayName - The display name for the agent to start the conversation with.
rootPolicyName - The name of the conversation policy to use.
selfRole - The role this agent is to play in the root conversation policy.

startConversation

public void startConversation(javax.agent.AgentName partnerAgentName,
                              java.lang.String rootPolicyName,
                              java.lang.String selfRole)
Attempts to initiate a conversation with the agent with the given AgentName. This uses the platform registry to look for the AgentDescription matching the given AgentName. If found, uses that AgentDescription. If not, aborts.

This method must be called in order to start a conversation, but thereafter, all processing is handled via calls to the decision logic invocation targets. In particular, the decision logic will immediately be required to fill in the parameters of the conversation-opener message defined by this agent's initial conversation policy.

Parameters:
partnerAgentName - The AgentName for the agent to start the conversation with.
rootPolicyName - The name of the conversation policy to use.
selfRole - The role this agent is to play in the root conversation policy.

startConversation

public void startConversation(javax.agent.service.directory.AgentDescription partnerDesc,
                              java.lang.String rootPolicyName,
                              java.lang.String selfRole)
Initiates a conversation with the agent with the given AgentDescription. This searches for a locator with type equal to PREFERRED_LOCATOR_TYPE. If found, sends the initial message to that locator. If not, aborts.

This method must be called in order to start a conversation, but thereafter, all processing is handled via calls to the decision logic invocation targets. In particular, the decision logic will immediately be required to fill in the parameters of the conversation-opener message defined by this agent's initial conversation policy.

Parameters:
partnerDesc - The AgentDescription for the agent to start the conversation with.
rootPolicyName - The name of the conversation policy to use.
selfRole - The role this agent is to play in the root conversation policy.

startConversation

public void startConversation(javax.agent.AgentName partnerAgentName,
                              javax.agent.Locator partnerLocator,
                              java.lang.String rootPolicyName,
                              java.lang.String selfRole)
Initiates a conversation with an agent. This uses the given AgentName and Locator.

This method must be called in order to start a conversation, but thereafter, all processing is handled via calls to the decision logic invocation targets. In particular, the decision logic will immediately be required to fill in the parameters of the conversation-opener message defined by this agent's initial conversation policy.

Parameters:
partnerAgentName - The AgentName for the agent to start the conversation with.
partnerLocator - The Locator to use in contacting the agent.
rootPolicyName - The name of the conversation policy to use.
selfRole - The role this agent is to play in the root conversation policy.

installTargetForCp

public void installTargetForCp(java.lang.String cpName,
                               java.lang.String role,
                               java.lang.Object target)
This configures this agent so that the given target will be used for all inbound decision callbacks associated with the given policy & role. In order to do so, it configures both the table of user-defined functions and the decision logic adapter.

The target object musthave methods for each of the callback names defined by the policy & role, each of which must take parameters (Converstion, DecisionDataHandle).

Parameters:
cpName - The conversation policy
role - The role (defines which decision-points to use
target - The target object.

init

public void init()
          throws AbleException
Initializes this agent.

Sets up a default message inbox; calls super.init(); installs the MessageTransportService (created in super.init()) in its MessageSystemAdapter; initializes its ConversationManager.

Specified by:
init in interface AbleRemoteBean
Overrides:
init in class AblePlatformDefaultAgent
Throws:
AbleException - On any error.

process

public void process()
             throws AbleException
Does one step of processing. Calls super.process(), then calls process() on its ConversationManager.

Specified by:
process in interface AbleRemoteBean
Overrides:
process in class AbleDefaultAgent
Throws:
AbleException - If the superclass or the conversationManager throws one.

logMessage

protected void logMessage(long msgType,
                          java.lang.String theMethodName,
                          java.lang.String theMessage)
Logs a message that includes the agent name in the message text.

Parameters:
msgType - The message type--e.g., Able.INFO.
theMethodName - The name of the method in which the exception occurred.
theMessage - The message to log.

logException

protected void logException(java.lang.String theMethodName,
                            java.lang.Exception theException)
Logs an exception with the agent's name in the message text.

Overrides:
logException in class AblePlatformDefaultAgent
Parameters:
theMethodName - The name of the method in which the exception occurred.
theException - The exception to log.

ABLE 2.3.0 07/13/2005 14:21:00

(C) Copyright IBM Corporation 1999, 2005