org.apache.axis2.clustering.management
Class DefaultNodeManager

java.lang.Object
  extended by org.apache.axis2.clustering.management.DefaultNodeManager
All Implemented Interfaces:
NodeManager, ParameterInclude

public class DefaultNodeManager
extends Object
implements NodeManager


Constructor Summary
DefaultNodeManager()
           
 
Method Summary
 void addParameter(Parameter param)
          Method addParameter.
 void commit()
          Second phase of the 2-phase commit protocol.
 void deserializeParameters(org.apache.axiom.om.OMElement parameterElement)
           
 void exceptionOccurred(Throwable throwable)
          To notify other nodes that an Exception occurred, during the processing of a NodeManagementCommand
 Parameter getParameter(String name)
          Method getParameter.
 ArrayList getParameters()
          Gets all the parameters in a given description.
 boolean isParameterLocked(String parameterName)
          Checks whether the parameter is locked at any level.
 void prepare()
          First phase of the 2-phase commit protocol.
 void removeParameter(Parameter param)
           
 void rollback()
          Rollback whatever was done
protected  void send(Throwable throwable)
           
 void sendMessage(NodeManagementCommand command)
          Execute a NodeManagementCommand
 void setConfigurationContext(ConfigurationContext configurationContext)
          Set the system's configuration context.
 void setSender(MessageSender sender)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultNodeManager

public DefaultNodeManager()
Method Detail

commit

public void commit()
            throws ClusteringFault
Description copied from interface: NodeManager
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 NodeManager
Throws:
ClusteringFault - If an error occurs while committing a cluster configuration transaction

exceptionOccurred

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

Specified by:
exceptionOccurred in interface NodeManager
Parameters:
throwable - The throwable which has to be propogated to other nodes
Throws:
ClusteringFault - If an error occurs while processing the exception message

prepare

public void prepare()
             throws ClusteringFault
Description copied from interface: NodeManager
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 NodeManager
Throws:
ClusteringFault - If an error occurs while preparing to commit

rollback

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

Specified by:
rollback in interface NodeManager
Throws:
ClusteringFault - If an error occurs while rolling back a cluster configuration transaction

send

protected void send(Throwable throwable)
             throws ClusteringFault
Throws:
ClusteringFault

sendMessage

public void sendMessage(NodeManagementCommand command)
                 throws ClusteringFault
Description copied from interface: NodeManager
Execute a NodeManagementCommand

Specified by:
sendMessage in interface NodeManager
Parameters:
command - The command to be executed
Throws:
ClusteringFault - If an error occurs while sending the message

setSender

public void setSender(MessageSender sender)

setConfigurationContext

public void setConfigurationContext(ConfigurationContext configurationContext)
Description copied from interface: NodeManager
Set the system's configuration context. This will be used by the clustering implementations to get information about the Axis2 environment and to correspond with the Axis2 environment

Specified by:
setConfigurationContext in interface NodeManager
Parameters:
configurationContext - The configuration context

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(String name)
Description copied from interface: ParameterInclude
Method getParameter.

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

getParameters

public 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(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 © 2004-2012 The Apache Software Foundation. All Rights Reserved.