Package com.adaptris.core
Interface ComponentState
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
ClosedState
,ComponentStateImp
,InitialisedState
,StartedState
,StoppedState
public interface ComponentState extends java.io.Serializable
Defines the state transition requests that can be made to a
StateManagedComponent
. Concrete implementations represent an actual state and permitted transitions from that state.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
requestClose(StateManagedComponent comp)
Perform operations required to movecomp
from this state toClosedState
, if possible.void
requestInit(StateManagedComponent comp)
Perform operations required to movecomp
from this state toInitialisedState
, if possible.void
requestRestart(StateManagedComponent comp)
Perform operations required to restart thecomp
.void
requestStart(StateManagedComponent comp)
Perform operations required to movecomp
from this state toStartedState
, if possible.void
requestStop(StateManagedComponent comp)
Perform operations required to movecomp
from this state toStoppedState
, if possible.
-
-
-
Method Detail
-
requestInit
void requestInit(StateManagedComponent comp) throws CoreException
Perform operations required to move
comp
from this state toInitialisedState
, if possible.- Parameters:
comp
- theStateManagedComponent
to manipulate- Throws:
CoreException
- wrapping any underlying exceptions
-
requestStart
void requestStart(StateManagedComponent comp) throws CoreException
Perform operations required to move
comp
from this state toStartedState
, if possible.- Parameters:
comp
- theStateManagedComponent
to manipulate- Throws:
CoreException
- wrapping any underlying exceptions
-
requestStop
void requestStop(StateManagedComponent comp)
Perform operations required to move
comp
from this state toStoppedState
, if possible.- Parameters:
comp
- theStateManagedComponent
to manipulate
-
requestClose
void requestClose(StateManagedComponent comp)
Perform operations required to move
comp
from this state toClosedState
, if possible.- Parameters:
comp
- theStateManagedComponent
to manipulate
-
requestRestart
void requestRestart(StateManagedComponent comp) throws CoreException
Perform operations required to restart the
comp
. Differs from start in that underlying components which are in theStartedState
will be stopped, closed, inited and started.- Parameters:
comp
- theStateManagedComponent
to manipulate- Throws:
CoreException
- wrapping any underlying exceptions
-
-