org.apache.axis2.clustering.configuration
Class DefaultConfigurationManager

java.lang.Object
  extended by org.apache.axis2.clustering.configuration.DefaultConfigurationManager
All Implemented Interfaces:
ConfigurationManager, ParameterInclude

public class DefaultConfigurationManager
extends java.lang.Object
implements ConfigurationManager


Constructor Summary
DefaultConfigurationManager()
           
 
Method Summary
 void addParameter(Parameter param)
          Method addParameter.
 void applyPolicy(java.lang.String serviceGroupName, java.lang.String policy)
          Apply a policy to a service
 void commit()
          Second phase of the 2-phase commit protocol.
 void deserializeParameters(org.apache.axiom.om.OMElement parameterElement)
           
 void exceptionOccurred(java.lang.Throwable throwable)
          To notify other nodes that an Exception occurred, during the processing of a ConfigurationClusteringCommand
 Parameter getParameter(java.lang.String name)
          Method getParameter.
 java.util.ArrayList getParameters()
          Gets all the parameters in a given description.
 boolean isParameterLocked(java.lang.String parameterName)
          Checks whether the parameter is locked at any level.
 void loadServiceGroups(java.lang.String[] serviceGroupNames)
          Load a set of service groups
 void prepare()
          First phase of the 2-phase commit protocol.
 void process(ConfigurationClusteringCommand command)
           
 void reloadConfiguration()
          Reload the entire configuration of an Axis2 Node
 void removeParameter(Parameter param)
           
 void rollback()
          Rollback whatever was done
protected  void send(ConfigurationClusteringCommand command)
           
protected  void send(java.lang.Throwable throwable)
           
 void setConfigurationContext(ConfigurationContext configurationContext)
          Set the configuration context
 void setConfigurationManagerListener(ConfigurationManagerListener listener)
          For registering a configuration event listener.
 void setSender(MessageSender sender)
           
 void unloadServiceGroups(java.lang.String[] serviceGroupNames)
          Unload a set of service groups
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultConfigurationManager

public DefaultConfigurationManager()
Method Detail

setConfigurationManagerListener

public void setConfigurationManagerListener(ConfigurationManagerListener listener)
Description copied from interface: ConfigurationManager
For registering a configuration event listener.

Specified by:
setConfigurationManagerListener in interface ConfigurationManager

applyPolicy

public void applyPolicy(java.lang.String serviceGroupName,
                        java.lang.String policy)
                 throws ClusteringFault
Description copied from interface: ConfigurationManager
Apply a policy to a service

Specified by:
applyPolicy in interface ConfigurationManager
Parameters:
serviceGroupName - The name of the service to which this policy needs to be applied
policy - The serialized policy to be applied to the service
Throws:
ClusteringFault

commit

public void commit()
            throws ClusteringFault
Description copied from interface: ConfigurationManager
Second phase of the 2-phase commit protocol. Notifies a node that it needs to switch to a new configuration.

Specified by:
commit in interface ConfigurationManager
Throws:
ClusteringFault

exceptionOccurred

public void exceptionOccurred(java.lang.Throwable throwable)
                       throws ClusteringFault
Description copied from interface: ConfigurationManager
To notify other nodes that an Exception occurred, during the processing of a ConfigurationClusteringCommand

Specified by:
exceptionOccurred in interface ConfigurationManager
Parameters:
throwable - The throwable which has to be propogated to other nodes
Throws:
ClusteringFault

loadServiceGroups

public void loadServiceGroups(java.lang.String[] serviceGroupNames)
                       throws ClusteringFault
Description copied from interface: ConfigurationManager
Load a set of service groups

Specified by:
loadServiceGroups in interface ConfigurationManager
Parameters:
serviceGroupNames - The set of service groups to be loaded
Throws:
ClusteringFault

prepare

public void prepare()
             throws ClusteringFault
Description copied from interface: ConfigurationManager
First phase of the 2-phase commit protocol. Notifies a node that it needs to prepare to switch to a new configuration.

Specified by:
prepare in interface ConfigurationManager
Throws:
ClusteringFault

reloadConfiguration

public void reloadConfiguration()
                         throws ClusteringFault
Description copied from interface: ConfigurationManager
Reload the entire configuration of an Axis2 Node

Specified by:
reloadConfiguration in interface ConfigurationManager
Throws:
ClusteringFault

rollback

public void rollback()
              throws ClusteringFault
Description copied from interface: ConfigurationManager
Rollback whatever was done

Specified by:
rollback in interface ConfigurationManager
Throws:
ClusteringFault

unloadServiceGroups

public void unloadServiceGroups(java.lang.String[] serviceGroupNames)
                         throws ClusteringFault
Description copied from interface: ConfigurationManager
Unload a set of service groups

Specified by:
unloadServiceGroups in interface ConfigurationManager
Parameters:
serviceGroupNames - The set of service groups to be unloaded
Throws:
ClusteringFault

send

protected void send(java.lang.Throwable throwable)
             throws ClusteringFault
Throws:
ClusteringFault

send

protected void send(ConfigurationClusteringCommand command)
             throws ClusteringFault
Throws:
ClusteringFault

setSender

public void setSender(MessageSender sender)

process

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

setConfigurationContext

public void setConfigurationContext(ConfigurationContext configurationContext)
Description copied from interface: ConfigurationManager
Set the configuration context

Specified by:
setConfigurationContext in interface ConfigurationManager

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.