public interface InterceptorInvocationActivity
The lifecycle of Interceptor Invocation Activities is primarily controlled by the SLEE application.
A new activity can be created by an SBB using the InterceptorExtensionsProvider.createInterceptorInvocationActivity()
method.
An Interceptor Invocation Activity explicitly ends when the SBB invokes endActivity()
on it, but will also implicitly end if the activity becomes unreferenced in the SLEE.
Each Interceptor Invocation Activity maintains a context in which any user variables set by interceptor scripts are stored. The values of these user variables persist for the lifetime of the activity and can be shared between individual interceptor invocations on the same activity.
Modifier and Type | Method and Description |
---|---|
void |
continueProcessing(int invocationID)
Notify the SIS that evaluation of the interceptor invocation with the given id should be continued.
|
void |
continueProcessing(int invocationID,
Object input)
Notify the SIS that evaluation of the interceptor invocation with the given id should be continued.
|
void |
endActivity()
End the interceptor invocation activity.
|
ScriptVariable |
getVariable(String name)
Get a script variable.
|
void |
halt(int invocationID)
Notify the SIS that further evaluation of the interceptor invocation with the given id should be immediately halted.
|
void continueProcessing(int invocationID) throws IllegalStateException
This method is only to be used by an interceptor extension component that has received an
InterceptorExtensionInvocationEvent
.
invocationID
- the interceptor invocation to be continued.IllegalStateException
- if the SIS is not currently waiting on the extension component to provide a response.
This exception could be thrown for example if the extension component has taken too long to respond to the
request and a timeout has occurred in the SIS.void continueProcessing(int invocationID, Object input) throws IllegalStateException
This method is only to be used by an interceptor extension component that has received an
InterceptorExtensionInvocationEvent
.
invocationID
- the interceptor invocation to be continued.input
- the new input object to replace the current input.IllegalStateException
- if the SIS is not currently waiting on the extension component to provide a response.
This exception could be thrown for example if the extension component has taken too long to respond to the
request and a timeout has occurred in the SIS.void halt(int invocationID) throws IllegalStateException
This method is only to be used by an interceptor extension component that has received an
InterceptorExtensionInvocationEvent
.
IllegalStateException
- if the SIS is not currently waiting on the extension component to provide a response.
This exception could be thrown for example if the extension component has taken too long to respond to the
request and a timeout has occurred in the SIS.ScriptVariable getVariable(String name) throws NullPointerException, IllegalArgumentException
name
- the name of the variable.NullPointerException
- if name
is null
.IllegalArgumentException
- if the variable name is invalid or unknown.
This exception is not thrown if the name identifies a user-defined variable,
since any user-defined variable name is valid.void endActivity()