@ComponentProfile(summary="A Service that refers to another Service configured elsewhere", tag="service") public class SharedService extends SharedServiceImpl
A Service instance that references a Service made available via SharedComponentList
.
By default the looked-up service is deep cloned before being loaded into your workflows.
You can turn off cloning by simply setting "clone-service=true".
In the adapter configuration file this class is aliased as shared-service which is the preferred alternative to the fully qualified classname when building your configuration.
eventHandler, log
Constructor and Description |
---|
SharedService() |
SharedService(java.lang.String lookupName) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes the component.
|
void |
doService(AdaptrisMessage msg)
Apply the service to the message.
|
java.lang.Boolean |
getCloneService() |
java.lang.String |
getLookupName()
Set the name of the service that will be looked up from
SharedComponentList.getServices() , |
void |
init()
Initialises the component.
|
boolean |
isBranching()
Returns true if the implementation supports branching.
|
void |
prepare()
Prepare for initialisation.
|
void |
setCloneService(java.lang.Boolean cloneService) |
void |
setLookupName(java.lang.String lookupName)
Set the name of the service that will be looked up from
SharedComponentList.getServices() , |
void |
start()
Starts the component.
|
void |
stop()
Stop the component
|
applyService, changeState, continueOnFailure, createName, createQualifier, deepClone, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, isTrackingEndpoint, registerEventHandler, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId
triggerJndiLookup
public SharedService()
public SharedService(java.lang.String lookupName)
public void init() throws CoreException
ComponentLifecycle
Component initialisation includes config verification, creation of connections etc.
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.
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
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
public void prepare() throws CoreException
ComponentLifecycleExtension
CoreException
public void doService(AdaptrisMessage msg) throws ServiceException
Service
Apply the service to the message.
msg
- the AdaptrisMessage
to processServiceException
- wrapping any underlying Exception
spublic boolean isBranching()
Service
Returns true if the implementation supports branching.
BranchingServiceCollection
public java.lang.Boolean getCloneService()
public void setCloneService(java.lang.Boolean cloneService)
public java.lang.String getLookupName()
SharedComponentList.getServices()
,public void setLookupName(java.lang.String lookupName)
SharedComponentList.getServices()
,