|
SmartFrog 3.10.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.smartfrog.sfcore.reference.RemoteReferenceResolverHelperImpl
org.smartfrog.sfcore.prim.PrimImpl
org.smartfrog.sfcore.compound.CompoundImpl
public class CompoundImpl
Implements the compound component behavior. A compound deploys component descriptions, and maintains them as its children. This includes liveness, termination and location behavior
| Field Summary | |
|---|---|
static int |
childCap
Initial capacity for child vector. |
static int |
childInc
Capacity increment for child vector. |
protected java.util.Vector |
lifecycleChildren
Maintains a temporal list of the children that have to be driven through their sfDeploy and sfStart lifecycle methods. |
protected java.util.Vector |
sfChildren
Maintains children on which life of compound depends (and vice versa). |
protected boolean |
sfSyncTerminate
Whether termination should be synchronous. |
| Fields inherited from class org.smartfrog.sfcore.prim.PrimImpl |
|---|
refLivenessDelay, refLivenessFactor, sfCompleteName, sfContext, sfDeployHooks, sfDeployWithHooks, sfExportRef, sfIsDeployed, sfIsStarted, sfIsTerminated, sfIsTerminating, sfLivenessCount, sfLivenessDelay, sfLivenessFactor, sfLivenessSender, sfParent, sfStartHooks, sfTerminateWithHooks, termLock |
| Constructor Summary | |
|---|---|
CompoundImpl()
Creates a compound implementation. |
|
| Method Summary | |
|---|---|
void |
sfAddChild(Liveness target)
Liveness interface to compound. |
protected void |
sfASyncTerminateWith(TerminationRecord status)
Terminate children asynchronously using a seperate thread for each call. |
java.util.Enumeration |
sfChildren()
Returns an enumeration over the children of the compound. |
boolean |
sfContainsChild(Liveness child)
Checks whether this compound contains given child. |
Prim |
sfCreateNewApp(java.lang.String name,
ComponentDescription cmp,
Context parms)
A high-level component deployment method - creates an app , running it through its entire lifecycle. |
Prim |
sfCreateNewChild(java.lang.Object name,
ComponentDescription cmp,
Context parms)
A high-level component deployment method - creates a child of this Compound, running it through its entire lifecycle. |
Prim |
sfCreateNewChild(java.lang.Object name,
Prim parent,
ComponentDescription cmp,
Context parms)
A high-level component deployment method - creates a child of 'parent' Compound, running it through its entire lifecycle. |
void |
sfDeploy()
Deploy the compound. |
protected void |
sfDeployChildren()
This is an override point. |
Prim |
sfDeployComponentDescription(java.lang.Object name,
Prim parent,
ComponentDescription cmp,
Context parms)
An internal SmartFrog method. |
void |
sfDeployWith(Prim parent,
Context cxt)
Primitive deploy call. |
protected void |
sfDeployWithChildren()
Method that selects the children that compound will drive through their lifecycle The children are stored in 'lifecycleChildren' |
void |
sfDumpState(Dump target)
Override to forward call to all liveness targets. |
void |
sfParentageChanged()
Parentage changed in component hierachy. |
void |
sfPing(java.lang.Object source)
Implements ping for a compound. |
protected void |
sfPingChild(Liveness child)
Called for each child by sfPing if liveness is to be passed on. |
java.lang.Object |
sfRemoveAttribute(java.lang.Object key)
Override superclass behaviour. |
boolean |
sfRemoveChild(Liveness target)
Removes a liveness interface from the heartbeat targets. |
void |
sfStart()
Starts the compound. |
protected void |
sfStartChildren()
This is an override point. |
protected void |
sfSyncTerminateWith(TerminationRecord status)
Iterates over children telling each of them to terminate quietly with given status. |
void |
sfTerminatedWith(TerminationRecord status,
Prim comp)
Sent by sub-components on termination. |
protected void |
sfTerminateWith(TerminationRecord status)
Performs the compound termination behaviour. |
| Methods inherited from class org.smartfrog.sfcore.reference.RemoteReferenceResolverHelperImpl |
|---|
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 class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.smartfrog.sfcore.prim.Prim |
|---|
sfAddAttribute, sfAttributeKeyFor, sfAttributes, sfCompleteName, sfContainsAttribute, sfContainsValue, sfContext, sfDeployedHost, sfDeployedProcessName, sfDetach, sfDetachAndTerminate, sfIsDeployed, sfIsStarted, sfIsTerminated, sfIsTerminating, sfParent, sfReplaceAttribute, sfTerminate, sfTerminateQuietlyWith, sfValues |
| 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 |
| Field Detail |
|---|
public static int childCap
public static int childInc
protected java.util.Vector sfChildren
protected java.util.Vector lifecycleChildren
protected boolean sfSyncTerminate
| Constructor Detail |
|---|
public CompoundImpl()
throws java.rmi.RemoteException
java.rmi.RemoteException - In case of Remote/nework error| Method Detail |
|---|
public Prim sfDeployComponentDescription(java.lang.Object name,
Prim parent,
ComponentDescription cmp,
Context parms)
throws SmartFrogDeploymentException
sfDeployComponentDescription in interface Compoundname - name to name deployed component under in contextparent - of deployer componentcmp - compiled component to deployparms - parameters for description
SmartFrogDeploymentException - failed to deploy compiled component
public Prim sfCreateNewChild(java.lang.Object name,
ComponentDescription cmp,
Context parms)
throws java.rmi.RemoteException,
SmartFrogDeploymentException
sfCreateNewChild in interface Compoundname - name of attribute which the deployed component should adoptcmp - compiled component to deploy and startparms - parameters for description
SmartFrogDeploymentException - failed to deploy compiled
component
java.rmi.RemoteException - In case of Remote/nework error
public Prim sfCreateNewApp(java.lang.String name,
ComponentDescription cmp,
Context parms)
throws java.rmi.RemoteException,
SmartFrogDeploymentException
sfCreateNewApp in interface Compoundname - name for the new applicationcmp - compiled component to deploy and startparms - parameters for description
SmartFrogDeploymentException - failed to deploy compiled
component
java.rmi.RemoteException - In case of Remote/nework error
public Prim sfCreateNewChild(java.lang.Object name,
Prim parent,
ComponentDescription cmp,
Context parms)
throws java.rmi.RemoteException,
SmartFrogDeploymentException
sfCreateNewChild in interface Compoundname - name of attribute which the deployed component should adoptparent - of deployer componentcmp - compiled component to deploy and startparms - parameters for description
SmartFrogDeploymentException - failed to deploy compiled
component
java.rmi.RemoteException - In case of Remote/nework error
public void sfAddChild(Liveness target)
throws java.rmi.RemoteException
sfAddChild in interface ChildMindertarget - target to heartbeat
java.rmi.RemoteException - In case of Remote/nework error
public boolean sfRemoveChild(Liveness target)
throws SmartFrogRuntimeException,
java.rmi.RemoteException
sfRemoveChild in interface ChildMindertarget - object to remove from heartbeat
SmartFrogRuntimeException - if failed to remove the child
java.rmi.RemoteException - In case of Remote/nework errorpublic boolean sfContainsChild(Liveness child)
sfContainsChild in interface ChildMinderchild - child to check
public java.util.Enumeration sfChildren()
sfChildren in interface ChildMinder
public java.lang.Object sfRemoveAttribute(java.lang.Object key)
throws SmartFrogRuntimeException,
java.rmi.RemoteException
sfRemoveAttribute in interface PrimsfRemoveAttribute in class PrimImplkey - attribute key to remove
SmartFrogRuntimeException - when name is null
java.rmi.RemoteException - In case of Remote/nework error
public void sfDeployWith(Prim parent,
Context cxt)
throws SmartFrogDeploymentException,
java.rmi.RemoteException
sfDeployWith in interface PrimsfDeployWith in class PrimImplparent - parent componentcxt - context for compound
SmartFrogDeploymentException - failed to deploy sub-components
java.rmi.RemoteException - In case of Remote/nework error
protected void sfDeployWithChildren()
throws SmartFrogDeploymentException
SmartFrogDeploymentException
public void sfDeploy()
throws SmartFrogException,
java.rmi.RemoteException
sfDeploy in interface PrimsfDeploy in class PrimImplSmartFrogException - failure deploying compound or
sub-component
java.rmi.RemoteException - In case of Remote/nework error
protected void sfDeployChildren()
throws SmartFrogResolutionException,
java.rmi.RemoteException,
SmartFrogLifecycleException
sfDeploy() after
Prim has deployed, and it instantiates all children.
It is not synchronized, but is called from a synchronized parent method.
If overridden, a subclass must call super.sfDeployChildren()
if they want to deploy any children.
SmartFrogResolutionException - if stuff cannot get resolved
java.rmi.RemoteException - if the network is playing up
SmartFrogLifecycleException - if any exception (or throwable) is
raised by a child component.
public void sfStart()
throws SmartFrogException,
java.rmi.RemoteException
sfStart in interface PrimsfStart in class PrimImplSmartFrogException - failed to start compound
java.rmi.RemoteException - In case of Remote/nework error
protected void sfStartChildren()
throws SmartFrogLifecycleException,
java.rmi.RemoteException,
SmartFrogResolutionException
sfStart() after
Prim has started, and it starts all children.
It is not synchronized, but is called from a synchronized parent method.
If overridden, a subclass must call super.sfStartChildren()
if they want to start any children.
SmartFrogResolutionException - if stuff cannot get resolved
java.rmi.RemoteException - if the network is playing up
SmartFrogLifecycleException - if any exception (or throwable) is
raised by a child component.protected void sfTerminateWith(TerminationRecord status)
sfTerminateWith in class PrimImplstatus - termination statusprotected void sfSyncTerminateWith(TerminationRecord status)
status - status to terminate withprotected void sfASyncTerminateWith(TerminationRecord status)
status - status to terminate with
public void sfTerminatedWith(TerminationRecord status,
Prim comp)
sfTerminatedWith in interface PrimsfTerminatedWith in class PrimImplstatus - termination status of sendercomp - sender of terminationpublic void sfDumpState(Dump target)
sfDumpState in interface PrimsfDumpState in class PrimImpltarget - target to dump to
public void sfPing(java.lang.Object source)
throws SmartFrogLivenessException,
java.rmi.RemoteException
sfPing in interface LivenesssfPing in class PrimImplsource - source of ping
SmartFrogLivenessException - liveness failed
java.rmi.RemoteException - for consistency with the Liveness interface
protected void sfPingChild(Liveness child)
throws SmartFrogLivenessException,
java.rmi.RemoteException
child - child to send to
SmartFrogLivenessException - failed to ping child
java.rmi.RemoteException - In case of Remote/nework error
public void sfParentageChanged()
throws java.rmi.RemoteException
sfParentageChanged in interface PrimsfParentageChanged in class PrimImpljava.rmi.RemoteException - In case of Remote/nework error
|
SmartFrog CORE 3.10.000 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||