com.ibm.conversation.base
Class BasicDecisionLogicAdapterFactory
java.lang.Object
|
+--com.ibm.conversation.base.BasicDecisionLogicAdapterFactory
- public class BasicDecisionLogicAdapterFactory
- extends java.lang.Object
Class BasicDecisionLogicAdapterFactory is a simple factory of DecisionLogicAdapter objects.
Users configure the factory by supplying (policyName, role, DecisionLogicAdapter-class)
tuples. In operation,
a user supplies a policy name and role, and a DecisionLogicAdapter of the given class type
is created and returned.
Note that this assumes that a (policyName, role) pair is sufficient to identify the class
type of the DecisionLogicAdapter to create.
Method Summary |
void |
addDecisionLogicClass(java.lang.String policyName,
java.lang.String role,
java.lang.Class dlaClass)
Associates the given DecisionLogicAdapter class with the given (policyName, role) pair. |
DecisionLogicAdapter |
createDecisionLogic(java.lang.String policyName,
java.lang.String role)
Creates and returns a new DecisionLogicAdapter for the (policyName, role) pair. |
boolean |
isSupported(java.lang.String policyName,
java.lang.String role)
Indicates whether the given (policyName, role) pair has had a DecisionLogicAdapter class
associated with it. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicDecisionLogicAdapterFactory
public BasicDecisionLogicAdapterFactory()
- Constructs a BasicDecisionLogicAdapterFactory object.
isSupported
public boolean isSupported(java.lang.String policyName,
java.lang.String role)
- Indicates whether the given (policyName, role) pair has had a DecisionLogicAdapter class
associated with it.
- Parameters:
policyName
- The name of a conversation policy.role
- The role in that conversation policy.- Returns:
- true if there is a DecisionLogicAdapter class associated with the args, false if not.
addDecisionLogicClass
public void addDecisionLogicClass(java.lang.String policyName,
java.lang.String role,
java.lang.Class dlaClass)
- Associates the given DecisionLogicAdapter class with the given (policyName, role) pair.
If the given class is not assignable to a DecisionLogicAdapter, then this does
nothing.
- Parameters:
policyName
- The name of a conversation policy.role
- The role in that conversation policy.dlaClass
- The DecisionLogicAdapter class to associate with that (policyName, role)
pair.
createDecisionLogic
public DecisionLogicAdapter createDecisionLogic(java.lang.String policyName,
java.lang.String role)
- Creates and returns a new DecisionLogicAdapter for the (policyName, role) pair.
- Parameters:
policyName
- The name of a conversation policy.role
- The role in that conversation policy.- Returns:
- The new DecisionLogicAdapter, or
null
if no match was found.
(C) Copyright IBM Corporation 1999, 2003