Class ThenService
- java.lang.Object
-
- com.adaptris.core.services.conditional.ThenService
-
- All Implemented Interfaces:
ComponentLifecycle
,ComponentLifecycleExtension
@ComponentProfile(summary="A service/list that should be executed after conditions have been met. ", tag="service, conditional") public class ThenService extends java.lang.Object implements ComponentLifecycle, ComponentLifecycleExtension
-
-
Constructor Summary
Constructors Constructor Description ThenService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes the component.Service
getService()
void
init()
Initialises the component.void
prepare()
Prepare for initialisation.void
setService(Service thenService)
void
start()
Starts the component.void
stop()
Stop the component
-
-
-
Method Detail
-
prepare
public void prepare() throws CoreException
Description copied from interface:ComponentLifecycleExtension
Prepare for initialisation.- Specified by:
prepare
in interfaceComponentLifecycleExtension
- Throws:
CoreException
-
init
public void init() throws CoreException
Description copied from interface:ComponentLifecycle
Initialises the component.Component initialisation includes config verification, creation of connections etc.
- Specified by:
init
in interfaceComponentLifecycle
- Throws:
CoreException
- wrapping any underlyingException
s
-
start
public void start() throws CoreException
Description copied from interface:ComponentLifecycle
Starts the component.Once a component is started it should be ready to process messages. In the case of
AdaptrisMessageConsumer
, calling start will begin message delivery.- Specified by:
start
in interfaceComponentLifecycle
- Throws:
CoreException
- wrapping any underlyingException
s
-
stop
public void stop()
Description copied from interface:ComponentLifecycle
Stop the componentA stopped component is not expected to be ready to process messages. In the case of
AdaptrisMessageConsumer
, calling stop will pause message delivery. Throwing aRuntimeException
may cause unintended consequences- Specified by:
stop
in interfaceComponentLifecycle
-
close
public void close()
Description copied from interface:ComponentLifecycle
Closes the component.A closed component should release any connections it uses, etc. and clean up completely. Throwing a
RuntimeException
may cause unintended consequences- Specified by:
close
in interfaceComponentLifecycle
-
getService
public Service getService()
-
setService
public void setService(Service thenService)
-
-