public class RaiseExceptionOutOfStateHandler extends OutOfStateHandlerImp
This implementation of the OutOfStateHandler
will simply throw an OutOfStateException
every time when a
StateManagedComponent
is not in the correct/expected state.
Example configuration:
<raise-exception-out-of-state-handler>
<correct-state>STARTED</correct-state>
</raise-exception-out-of-state-handler>
In the adapter configuration file this class is aliased as raise-exception-out-of-state-handler which is the preferred alternative to the fully qualified classname when building your configuration.
Constructor and Description |
---|
RaiseExceptionOutOfStateHandler() |
Modifier and Type | Method and Description |
---|---|
void |
handleOutOfState(StateManagedComponent component) |
getCorrectState, isInCorrectState, setCorrectState
public void handleOutOfState(StateManagedComponent component) throws OutOfStateException
OutOfStateException