SmartFrog 3.10.000

org.smartfrog.sfcore.processcompound
Interface ProcessCompound

All Superinterfaces:
ChildMinder, Compound, Diagnostics, Liveness, Prim, java.rmi.Remote, RemoteReferenceResolver, RemoteReferenceResolverHelper
All Known Implementing Classes:
ProcessCompoundImpl

public interface ProcessCompound
extends Compound

Defines the process deployment interface. A process compound can deploy component descriptions. It also manages other processes which contain process compounds.


Method Summary
 boolean sfDeRegister(Prim comp)
          DeRegisters a deployed component
 boolean sfIsRoot()
          Tests whether the Process Compound is the root process compound or not.
 void sfNotifySubprocessReady(java.lang.String name)
          Allows a sub-process to notify the root process compound that it is now ready to receive deployment requests.
 java.lang.String sfProcessName()
          Gets the process name for this process compound.
 java.lang.Object sfRegister(java.lang.Object name, Prim comp)
          Registers a deployed component inhibiting the generation of a new name for the component.
 java.lang.Object sfResolveHereOrWait(java.lang.Object name, long timeout)
          Tries to find an attribute in the local context.
 ProcessCompound sfResolveProcess(java.lang.Object name, ComponentDescription cd)
          Finds a process compound given a name.
 void systemExitOnTermination(boolean exit)
          Sets whether or not the ProcessCompound should terminate the JVM on exit.
 
Methods inherited from interface org.smartfrog.sfcore.compound.Compound
sfCreateNewApp, sfCreateNewChild, sfCreateNewChild, sfDeployComponentDescription
 
Methods inherited from interface org.smartfrog.sfcore.prim.Prim
sfAddAttribute, sfAttributeKeyFor, sfAttributes, sfCompleteName, sfContainsAttribute, sfContainsValue, sfContext, sfDeploy, sfDeployedHost, sfDeployedProcessName, sfDeployWith, sfDetach, sfDetachAndTerminate, sfDumpState, sfIsDeployed, sfIsStarted, sfIsTerminated, sfIsTerminating, sfParent, sfParentageChanged, sfRemoveAttribute, sfReplaceAttribute, sfStart, sfTerminate, sfTerminatedWith, sfTerminateQuietlyWith, sfValues
 
Methods inherited from interface org.smartfrog.sfcore.prim.Liveness
sfPing
 
Methods inherited from interface org.smartfrog.sfcore.reference.RemoteReferenceResolver
sfResolve, sfResolve, sfResolveHere, sfResolveHere, sfResolveParent
 
Methods inherited from interface org.smartfrog.sfcore.reference.RemoteReferenceResolverHelper
sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolve, sfResolveWithParser
 
Methods inherited from interface org.smartfrog.sfcore.prim.Diagnostics
sfDiagnosticsReport
 
Methods inherited from interface org.smartfrog.sfcore.prim.ChildMinder
sfAddChild, sfChildren, sfContainsChild, sfRemoveChild
 

Method Detail

sfProcessName

java.lang.String sfProcessName()
                               throws java.rmi.RemoteException
Gets the process name for this process compound.

Returns:
process name for this compound
Throws:
java.rmi.RemoteException - if there is any network or remote error

sfIsRoot

boolean sfIsRoot()
                 throws java.rmi.RemoteException
Tests whether the Process Compound is the root process compound or not.

Returns:
true if it is the root
Throws:
java.rmi.RemoteException - if there is any network or remote error

sfResolveProcess

ProcessCompound sfResolveProcess(java.lang.Object name,
                                 ComponentDescription cd)
                                 throws java.lang.Exception,
                                        java.rmi.RemoteException
Finds a process compound given a name. Creates the process if it does not exist.

Parameters:
name - process name to use
cd - component description with extra process configuration (ex. sfProcessAttributes)
Returns:
processcompound under name
Throws:
java.lang.Exception - failed to deploy or locate process
java.rmi.RemoteException - if there is any network or remote error

sfRegister

java.lang.Object sfRegister(java.lang.Object name,
                            Prim comp)
                            throws SmartFrogException,
                                   java.rmi.RemoteException
Registers a deployed component inhibiting the generation of a new name for the component. This is used, for example, for child process compounds which HAVE to be named right. Exception might indicate that the component cannot be registered since name is already in use. Registering a component will cause termination to be called when the processcompound is terminated (i.e. process is requested to exit. If name is null, a name is made up for the component

Parameters:
name - name for component
comp - component to register
Returns:
name of registered component
Throws:
SmartFrogException - if name already in use
java.rmi.RemoteException - if there is any network or remote error

sfDeRegister

boolean sfDeRegister(Prim comp)
                     throws SmartFrogException,
                            java.rmi.RemoteException
DeRegisters a deployed component

Parameters:
comp - component to register
Returns:
true if comp is degeregistered successfully else false
Throws:
SmartFrogException - if name already in use
java.rmi.RemoteException - if there is any network or remote error

sfResolveHereOrWait

java.lang.Object sfResolveHereOrWait(java.lang.Object name,
                                     long timeout)
                                     throws java.lang.Exception,
                                            java.rmi.RemoteException
Tries to find an attribute in the local context. If the attribute is not found the thread will wait for a notification from sfNotifySubprocessReady or until given timeout expires. Used to wait for a new process compound to appear.

Parameters:
name - name of attribute to wait for
timeout - max time to wait in millis
Returns:
The object found
Throws:
java.lang.Exception - attribute not found after timeout
java.rmi.RemoteException - if there is any network or remote error

sfNotifySubprocessReady

void sfNotifySubprocessReady(java.lang.String name)
                             throws java.rmi.RemoteException
Allows a sub-process to notify the root process compound that it is now ready to receive deployment requests.

Parameters:
name - the name of the subprocess
Throws:
java.rmi.RemoteException - if there is any network or remote error

systemExitOnTermination

void systemExitOnTermination(boolean exit)
                             throws java.rmi.RemoteException
Sets whether or not the ProcessCompound should terminate the JVM on exit. This is, by default, set to true. It is used if the ProcessCompound is created and managed by other code.

Parameters:
exit - whether or not to exit (true = exit)
Throws:
java.rmi.RemoteException - if there is any network or remote error

SmartFrog CORE 3.10.000

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