Package com.adaptris.core.services
Class ScriptingServiceImp
- java.lang.Object
-
- com.adaptris.core.ServiceImp
-
- com.adaptris.core.services.ScriptingServiceImp
-
- All Implemented Interfaces:
AdaptrisComponent,ComponentLifecycle,ComponentLifecycleExtension,DynamicPollingTemplate.TemplateProvider,MessageEventGenerator,Service,StateManagedComponent
- Direct Known Subclasses:
EmbeddedScriptingService,ScriptingService
public abstract class ScriptingServiceImp extends ServiceImp implements DynamicPollingTemplate.TemplateProvider
Base class for enabling JSR223 enabled scripting languages.
-
-
Field Summary
-
Fields inherited from class com.adaptris.core.ServiceImp
log
-
-
Constructor Summary
Constructors Constructor Description ScriptingServiceImp()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidcloseService()protected abstract java.io.ReadercreateReader()voiddoService(AdaptrisMessage msg)Apply the service to the message.java.lang.BooleangetBranchingEnabled()Specify whether or not this service is branching so it can be used as part of aBranchingServiceCollection.java.lang.StringgetLanguage()Set the JSR223 language the the script is written in.protected voidinitService()booleanisBranching()Returns true if the implementation supports branching.voidprepare()Prepare for initialisation.voidsetBranchingEnabled(java.lang.Boolean branchingEnabled)Specify whether or not this service is branching so it can be used as part of aBranchingServiceCollection.voidsetLanguage(java.lang.String language)Set the JSR223 language the the script is written in.-
Methods inherited from class com.adaptris.core.ServiceImp
changeState, close, continueOnFailure, createName, createQualifier, getContinueOnFail, getIsTrackingEndpoint, getUniqueId, init, isTrackingEndpoint, requestClose, requestInit, requestStart, requestStop, retrieveComponentState, setContinueOnFail, setIsTrackingEndpoint, setUniqueId, start, stop
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.adaptris.core.AdaptrisComponent
getUniqueId
-
Methods inherited from interface com.adaptris.core.ComponentLifecycle
close, init, start, stop
-
Methods inherited from interface com.adaptris.core.MessageEventGenerator
createName, createQualifier, isTrackingEndpoint
-
Methods inherited from interface com.adaptris.core.Service
continueOnFailure, setUniqueId
-
Methods inherited from interface com.adaptris.core.StateManagedComponent
changeState, requestClose, requestInit, requestStart, requestStop, retrieveComponentState
-
-
-
-
Method Detail
-
doService
public final void doService(AdaptrisMessage msg) throws ServiceException
Description copied from interface:ServiceApply the service to the message.
- Specified by:
doServicein interfaceService- Parameters:
msg- theAdaptrisMessageto process- Throws:
ServiceException- wrapping any underlyingExceptions
-
createReader
protected abstract java.io.Reader createReader() throws java.io.IOException- Throws:
java.io.IOException
-
initService
protected void initService() throws CoreException- Specified by:
initServicein classServiceImp- Throws:
CoreException
-
closeService
protected void closeService()
- Specified by:
closeServicein classServiceImp
-
prepare
public void prepare() throws CoreExceptionDescription copied from interface:ComponentLifecycleExtensionPrepare for initialisation.- Specified by:
preparein interfaceComponentLifecycleExtension- Throws:
CoreException
-
isBranching
public boolean isBranching()
Description copied from interface:ServiceReturns true if the implementation supports branching.
- Specified by:
isBranchingin interfaceService- Overrides:
isBranchingin classServiceImp- Returns:
- true if the implementation supports branching
- See Also:
BranchingServiceCollection
-
getLanguage
public java.lang.String getLanguage()
Set the JSR223 language the the script is written in.Depending on the language choice, you may need additional libraries that are not normally shipped with a standard Interlok distribution.
-
setLanguage
public void setLanguage(java.lang.String language)
Set the JSR223 language the the script is written in.Depending on the language choice, you may need additional libraries that are not normally shipped with a standard Interlok distribution.
-
getBranchingEnabled
public java.lang.Boolean getBranchingEnabled()
Specify whether or not this service is branching so it can be used as part of aBranchingServiceCollection.
-
setBranchingEnabled
public void setBranchingEnabled(java.lang.Boolean branchingEnabled)
Specify whether or not this service is branching so it can be used as part of aBranchingServiceCollection.
-
-