@ComponentProfile(summary="a case for a configured switch service", since="3.9.0") public class Case extends java.lang.Object implements ComponentLifecycle, ComponentLifecycleExtension
Switch
.Constructor and Description |
---|
Case() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the component.
|
boolean |
evaluate(AdaptrisMessage msg) |
void |
execute(AdaptrisMessage msg) |
Condition |
getCondition() |
Service |
getService() |
void |
init()
Initialises the component.
|
void |
prepare()
Prepare for initialisation.
|
void |
setCondition(Condition condition) |
void |
setService(Service service) |
void |
start()
Starts the component.
|
void |
stop()
Stop the component
|
Case |
withCondition(Condition condition) |
Case |
withService(Service service) |
public void prepare() throws CoreException
ComponentLifecycleExtension
prepare
in interface ComponentLifecycleExtension
CoreException
public void init() throws CoreException
ComponentLifecycle
Component initialisation includes config verification, creation of connections etc.
init
in interface ComponentLifecycle
CoreException
- wrapping any underlying Exception
spublic void start() throws CoreException
ComponentLifecycle
Once a component is started it should be ready to process messages. In the case of AdaptrisMessageConsumer
, calling start
will begin message delivery.
start
in interface ComponentLifecycle
CoreException
- wrapping any underlying Exception
spublic void stop()
ComponentLifecycle
A stopped component is not expected to be ready to process messages. In the case of AdaptrisMessageConsumer
, calling stop
will pause message delivery. Throwing a RuntimeException
may cause unintended consequences
stop
in interface ComponentLifecycle
public void close()
ComponentLifecycle
A closed component should release any connections it uses, etc. and clean up completely. Throwing a RuntimeException
may
cause unintended consequences
close
in interface ComponentLifecycle
public boolean evaluate(AdaptrisMessage msg) throws CoreException
CoreException
public void execute(AdaptrisMessage msg) throws ServiceException
ServiceException
public Condition getCondition()
public void setCondition(Condition condition)
public Service getService()
public void setService(Service service)