org.apache.axis2.clustering.context
Interface ContextManager

All Superinterfaces:
ParameterInclude
All Known Implementing Classes:
DefaultContextManager

public interface ContextManager
extends ParameterInclude


Method Summary
 java.util.Map getReplicationExcludePatterns()
          Get all the excluded context property name patterns
 boolean isContextClusterable(AbstractContext context)
           
 void removeContext(AbstractContext context)
          This method is called when AbstractContext is removed from the system
 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 updateContext(AbstractContext context)
          This method is called when properties in an AbstractContext are updated.
 void updateContext(AbstractContext context, java.lang.String[] propertyNames)
          This method is called when one need to update/replicate only certains properties in the specified context
 void updateContexts(AbstractContext[] contexts)
          This method is called when properties in a collection of AbstractContexts are updated.
 
Methods inherited from interface org.apache.axis2.description.ParameterInclude
addParameter, deserializeParameters, getParameter, getParameters, isParameterLocked, removeParameter
 

Method Detail

updateContext

void updateContext(AbstractContext context)
                   throws ClusteringFault
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.

Parameters:
context - The context to be replicated
Throws:
ClusteringFault - If replication fails

updateContext

void updateContext(AbstractContext context,
                   java.lang.String[] propertyNames)
                   throws ClusteringFault
This method is called when one need to update/replicate only certains properties in the specified context

Parameters:
context - The AbstractContext containing the properties to be replicated
propertyNames - The names of the specific properties that should be replicated
Throws:
ClusteringFault - If replication fails

updateContexts

void updateContexts(AbstractContext[] contexts)
                    throws ClusteringFault
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.

Parameters:
contexts - The AbstractContexts containing the properties to be replicated
Throws:
ClusteringFault - If replication fails

removeContext

void removeContext(AbstractContext context)
                   throws ClusteringFault
This method is called when AbstractContext is removed from the system

Parameters:
context - The AbstractContext to be removed
Throws:
ClusteringFault - If context removal fails

isContextClusterable

boolean isContextClusterable(AbstractContext context)
Parameters:
context - AbstractContext
Returns:
True - if the provided AbstractContext is clusterable

setContextManagerListener

void setContextManagerListener(ContextManagerListener listener)
Parameters:
listener - ContextManagerListener

setConfigurationContext

void setConfigurationContext(ConfigurationContext configurationContext)
Parameters:
configurationContext - ConfigurationContext

setReplicationExcludePatterns

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.

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

Parameters:
contextType - The type of the context such as org.apache.axis2.context.ConfigurationContext, org.apache.axis2.context.ServiceGroupContext & org.apache.axis2.context.ServiceContext. Also "defaults" is a special type, which will apply to all contexts
patterns - The patterns

getReplicationExcludePatterns

java.util.Map getReplicationExcludePatterns()
Get all the excluded context property name patterns

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


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