public interface ComponentLifecycle
StateManagedComponent for methods which control permitted
state transitions. StateManagedComponent| Modifier and Type | Method and Description |
|---|---|
default void |
close()
Closes the component.
|
default void |
init()
Initialises the component.
|
default void |
start()
Starts the component.
|
default void |
stop()
Stop the component
|
default void init()
throws CoreException
Component initialisation includes config verification, creation of connections etc.
CoreException - wrapping any underlying Exceptionsdefault void start()
throws CoreException
Once a component is started it should be ready to process messages. In the case of AdaptrisMessageConsumer, calling start
will begin message delivery.
CoreException - wrapping any underlying Exceptionsdefault void stop()
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
default void close()
A closed component should release any connections it uses, etc. and clean up completely. Throwing a RuntimeException may
cause unintended consequences