org.apache.axis2.clustering.context
Class DefaultContextManager

java.lang.Object
  extended by org.apache.axis2.clustering.context.DefaultContextManager
All Implemented Interfaces:
ContextManager, ParameterInclude

public class DefaultContextManager
extends java.lang.Object
implements ContextManager


Constructor Summary
DefaultContextManager()
           
 
Method Summary
 void addParameter(Parameter param)
          Method addParameter.
 void deserializeParameters(org.apache.axiom.om.OMElement parameterElement)
           
 Parameter getParameter(java.lang.String name)
          Method getParameter.
 java.util.ArrayList getParameters()
          Gets all the parameters in a given description.
 java.util.Map getReplicationExcludePatterns()
          Get all the excluded context property name patterns
 boolean isContextClusterable(AbstractContext context)
           
 boolean isMessageAcknowledged(java.lang.String messageUniqueId)
          Indicates whether a particular message has been ACKed by all members of a cluster
 boolean isParameterLocked(java.lang.String parameterName)
          Checks whether the parameter is locked at any level.
 void process(ContextClusteringCommand command)
           
 java.lang.String removeContext(AbstractContext context)
          This method is called when a new AbstractContext is removed from the system
 void removeParameter(Parameter param)
           
 void setConfigurationContext(ConfigurationContext configurationContext)
           
 void setContextManagerListener(ContextManagerListener listener)
           
 void setReplicationExcludePatterns(java.lang.String contextType, java.util.List patterns)
          All properties in the context with type contextType which have names that match the specified pattern will be excluded from replication.
 void setSender(ChannelSender sender)
           
 java.lang.String updateContext(AbstractContext context)
          This method is called when properties in an AbstractContext are updated.
 java.lang.String updateContexts(AbstractContext[] contexts)
          This method is called when properties in a collection of AbstractContexts are updated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultContextManager

public DefaultContextManager()
Method Detail

setSender

public void setSender(ChannelSender sender)

updateContext

public java.lang.String updateContext(AbstractContext context)
                               throws ClusteringFault
Description copied from interface: ContextManager
This method is called when properties in an AbstractContext are updated. This could be addition of new properties, modifications of existing properties or removal of properties.

Specified by:
updateContext in interface ContextManager
Returns:
The UUID of the message that was sent to the group communications framework
Throws:
ClusteringFault

updateContexts

public java.lang.String updateContexts(AbstractContext[] contexts)
                                throws ClusteringFault
Description copied from interface: ContextManager
This method is called when properties in a collection of AbstractContexts are updated. This could be addition of new properties, modifications of existing properties or removal of properties.

Specified by:
updateContexts in interface ContextManager
Returns:
The UUID of the message that was sent to the group communications framework
Throws:
ClusteringFault

removeContext

public java.lang.String removeContext(AbstractContext context)
                               throws ClusteringFault
Description copied from interface: ContextManager
This method is called when a new AbstractContext is removed from the system

Specified by:
removeContext in interface ContextManager
Returns:
The UUID of the message that was sent to the group communications framework
Throws:
ClusteringFault

isContextClusterable

public boolean isContextClusterable(AbstractContext context)
Specified by:
isContextClusterable in interface ContextManager
Returns:
True - if the provided AbstractContext is clusterable

isMessageAcknowledged

public boolean isMessageAcknowledged(java.lang.String messageUniqueId)
                              throws ClusteringFault
Description copied from interface: ContextManager
Indicates whether a particular message has been ACKed by all members of a cluster

Specified by:
isMessageAcknowledged in interface ContextManager
Returns:
true - if all memebers have ACKed the message with ID messageUniqueId false - otherwise
Throws:
ClusteringFault

process

public void process(ContextClusteringCommand command)
             throws ClusteringFault
Throws:
ClusteringFault

setContextManagerListener

public void setContextManagerListener(ContextManagerListener listener)
Specified by:
setContextManagerListener in interface ContextManager

setConfigurationContext

public void setConfigurationContext(ConfigurationContext configurationContext)
Specified by:
setConfigurationContext in interface ContextManager

setReplicationExcludePatterns

public void setReplicationExcludePatterns(java.lang.String contextType,
                                          java.util.List patterns)
Description copied from interface: ContextManager
All properties in the context with type contextType which have names that match the specified pattern will be excluded from replication.

Generally, we can use the context class name as the context type.

Specified by:
setReplicationExcludePatterns in interface ContextManager
patterns - The patterns

getReplicationExcludePatterns

public java.util.Map getReplicationExcludePatterns()
Description copied from interface: ContextManager
Get all the excluded context property name patterns

Specified by:
getReplicationExcludePatterns in interface ContextManager
Returns:
All the excluded pattern of all the contexts. The key of the Map is the the contextType. See ContextManager.setReplicationExcludePatterns(String,List). The values are of type List of String Objects, which are a collection of patterns to be excluded.

addParameter

public void addParameter(Parameter param)
                  throws AxisFault
Description copied from interface: ParameterInclude
Method addParameter.

Specified by:
addParameter in interface ParameterInclude
Throws:
AxisFault

removeParameter

public void removeParameter(Parameter param)
                     throws AxisFault
Specified by:
removeParameter in interface ParameterInclude
Throws:
AxisFault

getParameter

public Parameter getParameter(java.lang.String name)
Description copied from interface: ParameterInclude
Method getParameter.

Specified by:
getParameter in interface ParameterInclude
Returns:
Returns Parameter.

getParameters

public java.util.ArrayList getParameters()
Description copied from interface: ParameterInclude
Gets all the parameters in a given description.

Specified by:
getParameters in interface ParameterInclude
Returns:
Returns ArrayList.

isParameterLocked

public boolean isParameterLocked(java.lang.String parameterName)
Description copied from interface: ParameterInclude
Checks whether the parameter is locked at any level.

Specified by:
isParameterLocked in interface ParameterInclude

deserializeParameters

public void deserializeParameters(org.apache.axiom.om.OMElement parameterElement)
                           throws AxisFault
Specified by:
deserializeParameters in interface ParameterInclude
Throws:
AxisFault


Copyright © 2007 Apache Web Services Project. All Rights Reserved.