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

com.ibm.able.examples.conversation
Class AmabBuyerLogic

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

public class AmabBuyerLogic
extends AbleObject
implements java.io.Serializable

This class is an example of an AbleBean that can be used in conjunction with the ABLE Jas conversation agent to engage in an Asymmetric Multi-Attribute Bilateral (AMAB) Negotitation conversation assuming the role of a buyer.

This bean can be used inside the AbleJasConversationAgent to drive an AMAB conversation as defined in the amab_cp.xml included in the examples/datafiles directory.

See Also:
AbleJasConversationAgent, 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
AmabBuyerLogic()
          Constructor for AmabBuyerLogic
AmabBuyerLogic(java.lang.String theName)
          Constructor for AmabBuyerLogic
AmabBuyerLogic(java.lang.String theName, java.lang.String theComment)
          Constructor for AmabBuyerLogic
 
Method Summary
 java.lang.Object[] amabBuyerLogic(java.lang.String conversationId, java.lang.String decisionPoint, java.lang.Object[] decisionPointData)
          Decision logic connection function for the AmabBuyerLogic bean
 int getNumOfNegotiations()
          returns the numbre of negotiations
 int getNumOfRounds()
          Returns the number of rounds
 java.lang.String getStrategyParamsFile()
          Returns the strategy parameters file
 int getStrategyType()
          Returns the strategy type
 java.lang.String getUtilityParamsFile()
          Returns the utility parameters file
 int getUtilityParamsType()
          Returns the utility parameters file
 int getUtilityType()
          Returns the utility type
 void init()
          Initialize and configure the bean.
 void setNumOfNegotiations(int param)
          Sets the number of negotiations
 void setNumOfRounds(int param)
          Sets the number of rounds
 void setStrategyParamsFile(java.lang.String param)
          Sets the strategy parameters file
 void setStrategyType(int param)
          Sets the strategy type
 void setUtilityParamsFile(java.lang.String param)
          Sets the utility parameters file
 void setUtilityParamsType(int param)
          Sets the utility parameter type
 void setUtilityType(int param)
          Sets the utility type
 
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

AmabBuyerLogic

public AmabBuyerLogic()
               throws java.rmi.RemoteException
Constructor for AmabBuyerLogic

AmabBuyerLogic

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

AmabBuyerLogic

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

getNumOfNegotiations

public int getNumOfNegotiations()
returns the numbre of negotiations

Returns:
the number of negotiations

setNumOfNegotiations

public void setNumOfNegotiations(int param)
Sets the number of negotiations

Parameters:
param - the number of negotiations

getNumOfRounds

public int getNumOfRounds()
Returns the number of rounds

Returns:
the number of rounds

setNumOfRounds

public void setNumOfRounds(int param)
Sets the number of rounds

Parameters:
param - the number of rounds

getStrategyType

public int getStrategyType()
Returns the strategy type

Returns:
the strategy type

See Also:
AmabParams

setStrategyType

public void setStrategyType(int param)
Sets the strategy type

Parameters:
param - the strategy type

See Also:
AmabParams

getStrategyParamsFile

public java.lang.String getStrategyParamsFile()
Returns the strategy parameters file

Returns:
the strategy parameters file

setStrategyParamsFile

public void setStrategyParamsFile(java.lang.String param)
Sets the strategy parameters file

Parameters:
param - the strategy parameters file

getUtilityType

public int getUtilityType()
Returns the utility type

Returns:
the utility type

See Also:
AmabParams

setUtilityType

public void setUtilityType(int param)
Sets the utility type

Parameters:
param - the utility type

See Also:
AmabParams

getUtilityParamsType

public int getUtilityParamsType()
Returns the utility parameters file

Parameters:
param - the utility type

See Also:
AmabParams

setUtilityParamsType

public void setUtilityParamsType(int param)
Sets the utility parameter type

Parameters:
param - the utility parameter type

See Also:
AmabParams

getUtilityParamsFile

public java.lang.String getUtilityParamsFile()
Returns the utility parameters file

Returns:
the utility parameter file

setUtilityParamsFile

public void setUtilityParamsFile(java.lang.String param)
Sets the utility parameters file

Parameters:
file - the utility parameter file

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()

amabBuyerLogic

public java.lang.Object[] amabBuyerLogic(java.lang.String conversationId,
                                         java.lang.String decisionPoint,
                                         java.lang.Object[] decisionPointData)
Decision logic connection function for the AmabBuyerLogic bean

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