Package com.predic8.membrane.core.lang
Class AbstractScriptInterceptor
java.lang.Object
com.predic8.membrane.core.interceptor.AbstractInterceptor
com.predic8.membrane.core.lang.AbstractScriptInterceptor
- All Implemented Interfaces:
Interceptor
- Direct Known Subclasses:
GroovyInterceptor,JavascriptInterceptor
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.predic8.membrane.core.interceptor.Interceptor
Interceptor.Flow -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final com.fasterxml.jackson.databind.ObjectMapperprotected StringFields inherited from class com.predic8.membrane.core.interceptor.AbstractInterceptor
name, router -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetSrc()voidhandleAbort(Exchange exc) Called when anyInterceptor.handleRequest(Exchange)orInterceptor.handleResponse(Exchange)later in the chain returnedOutcome.ABORTor threw an exception.handleRequest(Exchange exc) handleResponse(Exchange exc) protected voidvoidinit()Called after parsing is complete and this has been added to the object tree (whose root is Router).protected abstract voidprotected OutcomerunScript(Exchange exc, Interceptor.Flow flow) voidMethods inherited from class com.predic8.membrane.core.interceptor.AbstractInterceptor
getDisplayName, getFlow, getHelpId, getLongDescription, getMessage, getRouter, getRule, getShortDescription, init, setDisplayName, setFlow
-
Field Details
-
om
protected static final com.fasterxml.jackson.databind.ObjectMapper om -
src
-
script
-
-
Constructor Details
-
AbstractScriptInterceptor
public AbstractScriptInterceptor()
-
-
Method Details
-
handleRequest
- Specified by:
handleRequestin interfaceInterceptor- Overrides:
handleRequestin classAbstractInterceptor- Throws:
Exception
-
handleResponse
- Specified by:
handleResponsein interfaceInterceptor- Overrides:
handleResponsein classAbstractInterceptor- Throws:
Exception
-
init
Description copied from class:AbstractInterceptorCalled after parsing is complete and this has been added to the object tree (whose root is Router).- Overrides:
initin classAbstractInterceptor- Throws:
IOExceptionClassNotFoundException
-
initInternal
- Throws:
IOExceptionClassNotFoundException
-
runScript
protected Outcome runScript(Exchange exc, Interceptor.Flow flow) throws InterruptedException, IOException, ClassNotFoundException -
handleScriptExecutionException
-
handleAbort
Description copied from interface:InterceptorCalled when anyInterceptor.handleRequest(Exchange)orInterceptor.handleResponse(Exchange)later in the chain returnedOutcome.ABORTor threw an exception.handleAbort is called in the reverse order of the chain (as handleResponse is).
- Specified by:
handleAbortin interfaceInterceptor- Overrides:
handleAbortin classAbstractInterceptor
-
getSrc
-
setSrc
-