|
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.conversation.AbleRemoteUdfDecisionLogicAdapter
The AbleRemoteUdfDecisionLogicAdapter uses ABLE's user-defined functions
(UDFs)--cf. com.ibm.able.AbleRemoteUserDefinedFunction
--as the means of
passing inputs to the agent's decision logic.
It contains a mapping from conversational contexts to names of user-defined functions, and a reference to an AbleUserDefinedFunctionManager--which is, in general, the agent that owns this DecisionLogicAdapter. When an AbleRemoteUdfDecisionLogicAdapter receives decision data from a Conversation, it uses the mapping to find the name of a user-defined function to invoke, then it uses the AbleUserDefinedFunctionManager to invoke that user-defined function.
Each of these user-defined functions must take parameters
(Conversation, DecisionDataHandle)
The mapping from conversation contexts to names is highly constrained. The only parts of the conversational context used are the name and current state of the active conversation policy.
In addition to table entries for the decision data names, there are two special user-defined function names that must be supplied:
(Conversation, String)
.(Conversation, MessageHandle)
.
Constructor Summary | |
---|---|
AbleRemoteUdfDecisionLogicAdapter()
Constructs an AbleRemoteUdrDecisionLogicAdapter object. |
|
AbleRemoteUdfDecisionLogicAdapter(AbleUserDefinedFunctionRemoteManager newMgr)
Constructs an AbleRemoteUdrDecisionLogicAdapter object. |
Method Summary | |
---|---|
void |
decisionPoint(Conversation conv,
DecisionDataHandle ddh)
Looks up and invokes the user-defined function associated with the Conversation's current context. |
java.lang.String |
getTimeoutUdfName()
Returns the name of the user-defined function to invoke on all "timeout" inputs |
protected java.lang.String |
getUdfName(java.lang.String policyName,
java.lang.String stateName)
Returns the AbleUserDefinedFunction name associated with the given policy and state. |
java.lang.String |
getUnexpectedMessageUdfName()
Returns the name of the user-defined function to invoke on all "unexpected message" inputs. |
void |
inboundData(Conversation conv,
DecisionDataHandle ddh)
Looks up and invokes the user-defined function associated with the Conversation's current context. |
void |
registerUdf(java.lang.String policyName,
java.lang.String stateName,
java.lang.String udfName)
Associates the given AbleUserDefinedFunction name with the given policy and state. |
void |
setTimeoutUdfName(java.lang.String timeoutUdfName)
Sets the the name of the user-defined function to invoke on all "timeout" inputs |
void |
setUdfManager(AbleUserDefinedFunctionRemoteManager newMgr)
Sets the AbleUserDefinedFunctionRemoteManager to use. |
void |
setUnexpectedMessageUdfName(java.lang.String unexpectedMessageUdfName)
Sets the name of the user-defined function to invoke on all "unexpected message" inputs. |
void |
timeout(Conversation conv,
java.lang.String newStateName)
Invokes the user-defined function with the name specified for "timeout" inputs. |
void |
unexpectedMessage(Conversation conv,
MessageHandle mh)
Invokes the user-defined function with the name specified for "unexpected message" inputs. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public AbleRemoteUdfDecisionLogicAdapter()
public AbleRemoteUdfDecisionLogicAdapter(AbleUserDefinedFunctionRemoteManager newMgr)
Method Detail |
public void setUdfManager(AbleUserDefinedFunctionRemoteManager newMgr)
newMgr
- The new AbleUserDefinedFunctionRemoteManager.public void registerUdf(java.lang.String policyName, java.lang.String stateName, java.lang.String udfName)
The user-defined function with the given name must take parameters
(Conversation, DecisionDataHandle)
.
policyName
- The policy part of the key to be associated with the given
user-defined function name.stateName
- The state-name part of the key to be associated with the given
user-defined function name.udfName
- The user-defined function name.protected java.lang.String getUdfName(java.lang.String policyName, java.lang.String stateName)
policyName
- The policy part of the key to be associated with the given
user-defined function name.stateName
- The state-name part of the key to be associated with the given
user-defined function name.public java.lang.String getTimeoutUdfName()
public void setTimeoutUdfName(java.lang.String timeoutUdfName)
The user-defined function with the given name must take parameters
(Conversation, String)
.
timeoutUdfName
- The user-defined function name to set.public java.lang.String getUnexpectedMessageUdfName()
public void setUnexpectedMessageUdfName(java.lang.String unexpectedMessageUdfName)
The user-defined function with the given name must take parameters
(Conversation, MessageHandle)
.
unexpectedMessageUdfName
- The user-defined function name to set.public void decisionPoint(Conversation conv, DecisionDataHandle ddh)
The user-defined function is invoked with these input parameters: (conv, ddh).
decisionPoint
in interface DecisionLogicAdapter
conv
- The Conversation to which this decision point applies.ddh
- The decision-data for this decision point.public void inboundData(Conversation conv, DecisionDataHandle ddh)
The user-defined function is invoked with these input parameters: (conv, ddh).
inboundData
in interface DecisionLogicAdapter
conv
- The Conversation to which this inbound decision-data applies.ddh
- The inbound decision-data.public void timeout(Conversation conv, java.lang.String newStateName)
The user-defined function is invoked with these input parameters: (conv, newStateName).
timeout
in interface DecisionLogicAdapter
conv
- The Conversation to which this timeout applies.newStateName
- The policy's current state.public void unexpectedMessage(Conversation conv, MessageHandle mh)
The user-defined function is invoked with these input parameters: (conv, mh).
unexpectedMessage
in interface DecisionLogicAdapter
conv
- The Conversation to which this unexpected message applies.mh
- The unexpected message.
|
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 |