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

com.ibm.conversation
Interface ConversationPolicyHandlerFactory

All Known Implementing Classes:
AbleConversationPolicyHandlerFactory

public interface ConversationPolicyHandlerFactory

The ConversationPolicyHandlerFactory interface is responsible for creation and initialization of ConversationPolicyHandlers.

Each ConversationManager has a ConversationPolicyHandlerFactory, which it assigns to each new Conversation when it creates it.


Method Summary
 ConversationPolicyHandler getPolicyHandler(java.lang.String cpName, java.lang.String selfRole)
          Creates and returns a new ConversationPolicyHandler initialized with the given conversation policy and role.
 java.util.Set getPolicyNames()
          Returns the names of the policies this factory is able to create.
 java.util.Collection getRoles(java.lang.String policyName)
          Returns the roles defined by the given conversation policy.
 boolean isPolicySupported(java.lang.String cpName, java.lang.String selfRole)
          Indicates whether the given policy and role is supported.
 

Method Detail

getPolicyNames

public java.util.Set getPolicyNames()
Returns the names of the policies this factory is able to create.

Returns:
The Set of policy names.

getRoles

public java.util.Collection getRoles(java.lang.String policyName)
Returns the roles defined by the given conversation policy.

Parameters:
policyName - The name of the conversation policy.
Returns:
A Collection containing the roles, or null if the policyName was not found.

isPolicySupported

public boolean isPolicySupported(java.lang.String cpName,
                                 java.lang.String selfRole)
Indicates whether the given policy and role is supported. This is equivalent to whether a ConversationPolicyHandler for the given policy & role can be created.

Returns:
true if the policy/role is supported, false if not.

getPolicyHandler

public ConversationPolicyHandler getPolicyHandler(java.lang.String cpName,
                                                  java.lang.String selfRole)
Creates and returns a new ConversationPolicyHandler initialized with the given conversation policy and role.

If there is no known policy with the given name, or if the role does not match one of the roles defined in the policy, returns null.

Parameters:
cpName - The name of the conversation policy to be used.
selfRole - The role to play in the conversation policy.
Returns:
The new ConversationPolicyHandler, or null if creation failed.

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

(C) Copyright IBM Corporation 1999, 2003