public abstract class AbstractStatefulDeployer extends AbstractDeployer implements StatefulDeployer
Any changes in the state of its own objects should be propagated to any state change listeners by calling one of the fireStateXXXX() methods.
Stateful.State
Constructor and Description |
---|
AbstractStatefulDeployer(int sequence) |
Modifier and Type | Method and Description |
---|---|
protected void |
addStateChangeListeners()
Called when the first state change listener is registered into this Deployer.
|
StatefulDeployer.Handle |
attachDisabledStateChangeListener(java.lang.Object listener) |
StatefulDeployer.Handle |
attachStateChangeListener(java.lang.Object listener)
Attaches a listener for events from the
DeployerStateChange category. |
void |
deploy(int deploySequenceId,
DeployShell shell)
Do the actual deployment task.
|
void |
finish(int deploySequenceId,
DeployShell shell)
Called after the entire Deployment process has completed, perform any cleanup
operations here.
|
protected void |
fireStateChanged() |
protected void |
fireStateInvalidated() |
protected void |
fireStateReleased() |
void |
initializeState()
Transition from 'Uninitialized' to 'Initialized'.
|
void |
invalidateState()
Transition from 'Valid' to 'Initialized' state.
|
void |
prepare(int deploySequenceId,
DeployShell shell)
Called to do any preparatory work before the actual deployment takes
place.
|
void |
releaseState()
Release state and any resources its holding.
|
protected void |
removeStateChangeListeners()
Called when the last state change listener is unregistered into this Deployer.
|
protected java.lang.Object |
stateLockObject() |
cancel, cancelImpl, canDeploy, deployImpl, finishImpl, getName, getSequenceId, handleEvent, isDeploymentCancelled, prepareImpl, throwExceptionIfCancelEventReceived, toString
public void prepare(int deploySequenceId, DeployShell shell) throws DeployException
Deployer
prepare
in interface Deployer
prepare
in class AbstractDeployer
DeployException
public void finish(int deploySequenceId, DeployShell shell)
Deployer
finish
in interface Deployer
finish
in class AbstractDeployer
public StatefulDeployer.Handle attachStateChangeListener(java.lang.Object listener)
StatefulDeployer
DeployerStateChange
category.attachStateChangeListener
in interface StatefulDeployer
public void deploy(int deploySequenceId, DeployShell shell) throws DeployException
Deployer
deploy
in interface Deployer
deploy
in class AbstractDeployer
DeployException
public StatefulDeployer.Handle attachDisabledStateChangeListener(java.lang.Object listener)
attachDisabledStateChangeListener
in interface StatefulDeployer
protected java.lang.Object stateLockObject()
public void initializeState()
Stateful
initializeState
in interface Stateful
public void invalidateState()
Stateful
invalidateState
in interface Stateful
public void releaseState()
Stateful
releaseState
in interface Stateful
protected void fireStateChanged()
protected void fireStateInvalidated()
protected void fireStateReleased()
protected void addStateChangeListeners()
protected void removeStateChangeListeners()