Class Enqueue

  • All Implemented Interfaces:
    adams.core.logging.LoggingLevelHandler, adams.core.logging.LoggingSupporter, InterceptorWithActor, org.apache.cxf.interceptor.Interceptor<org.apache.cxf.message.Message>, org.apache.cxf.phase.PhaseInterceptor<org.apache.cxf.message.Message>

    public class Enqueue
    extends AbstractOutInterceptor
    implements InterceptorWithActor
    Enqueues a token in the specified queue whenever an outgoing message is intercepted.
    Author:
    fracpete (fracpete at waikato dot ac dot nz)
    • Field Detail

      • m_StorageName

        protected adams.flow.control.StorageName m_StorageName
        the queue to enqueue the token in.
      • m_EnqueueMessage

        protected boolean m_EnqueueMessage
        whether to enqueue the message or just a NullToken.
      • m_Actor

        protected adams.flow.core.Actor m_Actor
        the actor to use for getting access to queues.
    • Constructor Detail

      • Enqueue

        public Enqueue()
        Initializes the interceptor.
    • Method Detail

      • setStorageName

        public void setStorageName​(adams.flow.control.StorageName value)
        Sets the queue to use.
        Parameters:
        value - the queue
      • getStorageName

        public adams.flow.control.StorageName getStorageName()
        Returns the queue in use.
        Returns:
        the queue
      • setEnqueueMessage

        public void setEnqueueMessage​(boolean value)
        Sets whether to enqueue the whole message or just a NullToken.
        Parameters:
        value - true if to enqueue whole message
      • getEnqueueMessage

        public boolean getEnqueueMessage()
        Returns whether to enqueue the whole message or just a NullToken.
        Returns:
        true if to enqueue whole message
      • setActor

        public void setActor​(adams.flow.core.Actor value)
        Sets the actor to use.
        Specified by:
        setActor in interface InterceptorWithActor
        Parameters:
        value - the actor to use
      • getActor

        public adams.flow.core.Actor getActor()
        Returns the actor in use.
        Specified by:
        getActor in interface InterceptorWithActor
        Returns:
        the actor in use
      • handleMessage

        public void handleMessage​(org.apache.cxf.message.Message message)
                           throws org.apache.cxf.interceptor.Fault
        Intercepts a message. Interceptors should NOT invoke handleMessage or handleFault on the next interceptor - the interceptor chain will take care of this.
        Specified by:
        handleMessage in interface org.apache.cxf.interceptor.Interceptor<org.apache.cxf.message.Message>
        Parameters:
        message -
        Throws:
        org.apache.cxf.interceptor.Fault