public abstract class ScriptingServiceImp extends ServiceImp implements DynamicPollingTemplate.TemplateProvider
log
Constructor and Description |
---|
ScriptingServiceImp() |
Modifier and Type | Method and Description |
---|---|
protected void |
closeService() |
protected abstract java.io.Reader |
createReader() |
void |
doService(AdaptrisMessage msg)
Apply the service to the message.
|
java.lang.Boolean |
getBranchingEnabled() |
java.lang.String |
getLanguage() |
protected void |
initService() |
boolean |
isBranching()
Returns true if the implementation supports branching.
|
void |
prepare()
Prepare for initialisation.
|
void |
setBranchingEnabled(java.lang.Boolean branching)
Specify whether or not this service is branching.
|
void |
setLanguage(java.lang.String s)
Set the language the the script is written in.
|
void |
start()
Starts the component.
|
void |
stop()
Stop the component
|
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
continueOnFailure, setUniqueId
createName, createQualifier, isTrackingEndpoint
changeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentState
getUniqueId
close, init
public final void doService(AdaptrisMessage msg) throws ServiceException
Service
Apply the service to the message.
doService
in interface Service
msg
- the AdaptrisMessage
to processServiceException
- wrapping any underlying Exception
sprotected abstract java.io.Reader createReader() throws java.io.IOException
java.io.IOException
protected void initService() throws CoreException
initService
in class ServiceImp
CoreException
protected void closeService()
closeService
in class ServiceImp
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
public java.lang.String getLanguage()
public void setLanguage(java.lang.String s)
s
- a JSR223 supported language.public void prepare() throws CoreException
ComponentLifecycleExtension
prepare
in interface ComponentLifecycleExtension
CoreException
public boolean isBranching()
Service
Returns true if the implementation supports branching.
isBranching
in interface Service
isBranching
in class ServiceImp
BranchingServiceCollection
public java.lang.Boolean getBranchingEnabled()
public void setBranchingEnabled(java.lang.Boolean branching)
branching
- true to cause isBranching()
to return true; default is false.Service.isBranching()