Interface InterceptorInvocationActivity


  • public interface InterceptorInvocationActivity
    The Interceptor Invocation Activity is the activity type on which the SIS fires events to interceptor extension components from interceptors that have been invoked directly by SLEE applications.

    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.

    Since:
    SIS 2.5.0
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method 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.
    • Method Detail

      • continueProcessing

        void continueProcessing​(int invocationID)
                         throws IllegalStateException
        Notify the SIS that evaluation of the interceptor invocation with the given id should be continued. No changes to the current input object are made.

        This method is only to be used by an interceptor extension component that has received an InterceptorExtensionInvocationEvent.

        Parameters:
        invocationID - the interceptor invocation to be continued.
        Throws:
        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.
      • continueProcessing

        void continueProcessing​(int invocationID,
                                Object input)
                         throws IllegalStateException
        Notify the SIS that evaluation of the interceptor invocation with the given id should be continued. The current input object for the interceptor is replaced with the specified object.

        This method is only to be used by an interceptor extension component that has received an InterceptorExtensionInvocationEvent.

        Parameters:
        invocationID - the interceptor invocation to be continued.
        input - the new input object to replace the current input.
        Throws:
        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.
      • halt

        void halt​(int invocationID)
           throws IllegalStateException
        Notify the SIS that further evaluation of the interceptor invocation with the given id should be immediately halted.

        This method is only to be used by an interceptor extension component that has received an InterceptorExtensionInvocationEvent.

        Parameters:
        invocationID - the interceptor invocation to be continued.
        Throws:
        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.
      • endActivity

        void endActivity()
        End the interceptor invocation activity. If the activity is already ending, or has already ended, this method has no further effect.