SmartFrog 3.10.000

org.smartfrog.sfcore.common
Class ConfigurationAction

java.lang.Object
  extended by org.smartfrog.sfcore.common.ConfigurationAction
Direct Known Subclasses:
ActionDeploy, ActionDetach, ActionDetachAndTerminate, ActionDiagnostics, ActionParse, ActionPing, ActionTerminate, ActionUpdate

public abstract class ConfigurationAction
extends java.lang.Object

This code contains the methods to do things from configurations. It is a factoring out of SFSystem.


Constructor Summary
ConfigurationAction()
           
 
Method Summary
 java.lang.Object execute(ConfigurationDescriptor configuration)
          Locate the target from the configuration, then call #execute() with the target specified this is an optional override point, giving the overrider the option of using an alternate target mapping process
abstract  java.lang.Object execute(ProcessCompound targetP, ConfigurationDescriptor configuration)
          this has to be implemented by subclasses; execute a configuration command against a specified target.
protected static boolean HandleTerminationException(java.rmi.RemoteException ex, boolean rootProcess)
          special handler for processing exceptions during termination; socket failures are actually viewed as successful terminations, as they are often the symptom of success.
static ProcessCompound selectTargetProcess(java.lang.String host, java.lang.String subProcess)
          Select target process compound using host and subprocess names
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationAction

public ConfigurationAction()
Method Detail

selectTargetProcess

public static ProcessCompound selectTargetProcess(java.lang.String host,
                                                  java.lang.String subProcess)
                                           throws SmartFrogException,
                                                  java.rmi.RemoteException
Select target process compound using host and subprocess names

Parameters:
host - host name. If null, assumes localhost.
subProcess - subProcess name (optional; can be null)
Returns:
ProcessCompound the target process compound
Throws:
SmartFrogException - In case of SmartFrog system error
java.rmi.RemoteException - In case of network/rmi error

execute

public abstract java.lang.Object execute(ProcessCompound targetP,
                                         ConfigurationDescriptor configuration)
                                  throws SmartFrogException,
                                         java.rmi.RemoteException
this has to be implemented by subclasses; execute a configuration command against a specified target. This version looks up the target and notes if it was a root process or not. then

Parameters:
targetP - target process
configuration - configuration command to be executed
Returns:
Object Reference to component
Throws:
SmartFrogException - failure in some part of the process
java.rmi.RemoteException - In case of network/rmi error

execute

public java.lang.Object execute(ConfigurationDescriptor configuration)
                         throws SmartFrogException,
                                java.rmi.RemoteException
Locate the target from the configuration, then call #execute() with the target specified this is an optional override point, giving the overrider the option of using an alternate target mapping process

Parameters:
configuration - configuration command to be executed
Returns:
Object Reference to component
Throws:
SmartFrogException - failure in some part of the process
java.rmi.RemoteException - In case of network/rmi error

HandleTerminationException

protected static boolean HandleTerminationException(java.rmi.RemoteException ex,
                                                    boolean rootProcess)
                                             throws java.rmi.RemoteException
special handler for processing exceptions during termination; socket failures are actually viewed as successful terminations, as they are often the symptom of success.

Parameters:
ex - RemoteException to be handled
rootProcess - boolean indicating if the component is rootProcess or not
Returns:
boolean indiacating if action was successful or not.
Throws:
java.rmi.RemoteException - In case of network/rmi error

SmartFrog CORE 3.10.000

(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP