|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectcom.ibm.able.conversation.AbleOwned
com.ibm.able.conversation.AbleRemoteUdfDecisionLogicAdapter
The AbleRemoteUdfDecisionLogicAdapter uses ABLE's user-defined functions
(UDFs)--cf. AbleUserDefinedFunction--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(AbleBean newOwner,
AbleUserDefinedFunctionRemoteManager newMgr)
Constructs an AbleRemoteUdrDecisionLogicAdapter object. |
|
AbleRemoteUdfDecisionLogicAdapter(AbleUserDefinedFunctionRemoteManager newMgr)
Constructs an AbleRemoteUdrDecisionLogicAdapter object. |
|
| Method Summary | |
|---|---|
void |
createTarget(java.lang.String cpName,
java.lang.String callbackName,
java.lang.Object target)
Helper routine to create and register as a UDF the given target for the given decision callback. |
AbleUserDefinedFunction |
createUdf(java.lang.String udfName,
java.lang.Object targetObject,
java.lang.String targetMethodName,
java.lang.Class[] targetArgTypes)
Helper routine to create a new UDF and register it with the UDF Manager. |
void |
decisionPoint(Conversation conv,
DecisionDataHandle ddh)
Looks up and invokes the user-defined function associated with the Conversation's current context. |
java.lang.String |
getDefaultDecisionUdfName()
Returns the name of the user-defined function to invoke as a last resort on "decision point" and "inbound data" inputs, when there is no appropriate table entry. |
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. |
java.lang.String |
getUnusedUdfName(java.lang.String baseName,
int arity)
Helper routine to find a unique name for a new UDF. |
void |
inboundData(Conversation conv,
DecisionDataHandle ddh)
Looks up and invokes the user-defined function associated with the Conversation's current context. |
protected void |
invokeTarget(java.lang.String name,
java.lang.Object[] args)
|
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 |
setDefaultDecisionUdfName(java.lang.String udfName)
Sets the name of the user-defined function to invoke as a last resort on "decision point" and "inbound data" inputs, when there is no appropriate table entry. |
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 com.ibm.able.conversation.AbleOwned |
|---|
getAbleOwner, logException, logMessage, setAbleOwner |
| 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)
newMgr - The new AbleUserDefinedFunctionRemoteManager.
public AbleRemoteUdfDecisionLogicAdapter(AbleBean newOwner,
AbleUserDefinedFunctionRemoteManager newMgr)
newOwner - The AbleBean that owns this object.newMgr - The AbleUserDefinedFunctionRemoteManager to use.| 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 java.lang.String getDefaultDecisionUdfName()
public void setDefaultDecisionUdfName(java.lang.String udfName)
The user-defined function with the given name must take parameters
(Conversation, DecisionDataHandle).
udfName - The user-defined function name to set.
public java.lang.String getUnusedUdfName(java.lang.String baseName,
int arity)
throws java.rmi.RemoteException
baseName - The base part of the name.arity - The arity of the UDF.
java.rmi.RemoteException
public AbleUserDefinedFunction createUdf(java.lang.String udfName,
java.lang.Object targetObject,
java.lang.String targetMethodName,
java.lang.Class[] targetArgTypes)
throws java.rmi.RemoteException,
java.lang.NoSuchMethodException
udfName - The name of the UDF to create. Not tested for uniqueness.targetObject - The object of the UDF.targetMethodName - The method of the UDF.targetArgTypes - The class types of the UDF's parameters.
java.rmi.RemoteException - If UDF creation failed.
java.lang.NoSuchMethodException - If targetObject does not have the given method.
public void createTarget(java.lang.String cpName,
java.lang.String callbackName,
java.lang.Object target)
throws java.rmi.RemoteException,
java.lang.NoSuchMethodException
cpName - The name of the conversation policy for the callback.callbackName - The name of the decision callbacktarget - The object to invoke through the callback.
java.rmi.RemoteException - If UDF creation failed.
java.lang.NoSuchMethodException - If the target doesn't have the right method.
public void decisionPoint(Conversation conv,
DecisionDataHandle ddh)
The user-defined function is invoked with these input parameters: (conv, ddh).
decisionPoint in interface DecisionLogicAdapterconv - 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 DecisionLogicAdapterconv - 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 DecisionLogicAdapterconv - 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 DecisionLogicAdapterconv - The Conversation to which this unexpected message applies.mh - The unexpected message.com.ibm.able.conversation
protected void invokeTarget(java.lang.String name,
java.lang.Object[] args)
|
ABLE 2.3.0 07/13/2005 14:21:00 | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||