Class RequestOperationContextManager

  • All Implemented Interfaces:
    java.util.EventListener, javax.servlet.ServletRequestListener

    public class RequestOperationContextManager
    extends java.lang.Object
    implements javax.servlet.ServletRequestListener
    Servlet request listener that initializes request-operation scope context when request is initialized and detaches from it when request is destroyed.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.lang.String ATTRIBUTE_REQUEST_ID  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Object getRequestId()
      Gets an identity of a request processed by current thread.
      void requestDestroyed​(javax.servlet.ServletRequestEvent servletRequestEvent)  
      void requestInitialized​(javax.servlet.ServletRequestEvent servletRequestEvent)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • ATTRIBUTE_REQUEST_ID

        protected static final java.lang.String ATTRIBUTE_REQUEST_ID
        See Also:
        Constant Field Values
    • Constructor Detail

      • RequestOperationContextManager

        public RequestOperationContextManager()
    • Method Detail

      • getRequestId

        public static java.lang.Object getRequestId()
        Gets an identity of a request processed by current thread. If thread is not bound to any request, null is returned.
        Returns:
        identity of currently processed request or null if it doesn't exist
      • requestInitialized

        public void requestInitialized​(javax.servlet.ServletRequestEvent servletRequestEvent)
        Specified by:
        requestInitialized in interface javax.servlet.ServletRequestListener
      • requestDestroyed

        public void requestDestroyed​(javax.servlet.ServletRequestEvent servletRequestEvent)
        Specified by:
        requestDestroyed in interface javax.servlet.ServletRequestListener