public abstract class CacheServiceImpl extends ServiceImp implements ConnectedService
log
Constructor and Description |
---|
CacheServiceImpl() |
Modifier and Type | Method and Description |
---|---|
void |
closeService() |
AdaptrisConnection |
getConnection()
Returns the
AdaptrisConnection to use. |
void |
initService() |
void |
prepare()
Prepare for initialisation.
|
protected Cache |
retrieveCache() |
void |
setConnection(AdaptrisConnection cacheConnection)
Set the connection associated with this cache service.
|
void |
start()
Starts the component.
|
void |
stop()
Stop the component
|
<T extends CacheServiceImpl> |
withConnection(AdaptrisConnection c) |
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isBranching, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
continueOnFailure, doService, isBranching, setUniqueId
createName, createQualifier, isTrackingEndpoint
changeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentState
getUniqueId
close, init
public void prepare() throws CoreException
ComponentLifecycleExtension
prepare
in interface ComponentLifecycleExtension
CoreException
public void closeService()
closeService
in class ServiceImp
public void initService() throws CoreException
initService
in class ServiceImp
CoreException
public 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
start
in class ServiceImp
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
stop
in class ServiceImp
protected Cache retrieveCache()
public AdaptrisConnection getConnection()
ConnectedService
AdaptrisConnection
to use.getConnection
in interface ConnectedService
AdaptrisConnection
public void setConnection(AdaptrisConnection cacheConnection)
setConnection
in interface ConnectedService
cacheConnection
- the AdaptrisConnection
to useCacheConnection
,
SharedConnection
public <T extends CacheServiceImpl> T withConnection(AdaptrisConnection c)