Class AsyncServletRequest

  • All Implemented Interfaces:
    EventListener, javax.servlet.AsyncListener

    public class AsyncServletRequest
    extends Object
    implements javax.servlet.AsyncListener
    Wrapper object to hold and track Async servlet requests. This is a replacement for the deprecated/removed Jetty Continuation API as that has long been replaced by the Servlet Async api.
    • Constructor Detail

      • AsyncServletRequest

        public AsyncServletRequest​(javax.servlet.ServletRequest request)
    • Method Detail

      • complete

        public void complete()
      • startAsync

        public void startAsync()
      • dispatch

        public void dispatch()
      • setAttribute

        public void setAttribute​(String name,
                                 Object attribute)
      • setTimeoutMs

        public void setTimeoutMs​(long timeoutMs)
      • isInitial

        public boolean isInitial()
      • isExpired

        public boolean isExpired()
      • isDispatched

        public boolean isDispatched()
      • getAsyncContext

        public javax.servlet.AsyncContext getAsyncContext()
      • onComplete

        public void onComplete​(javax.servlet.AsyncEvent event)
        Specified by:
        onComplete in interface javax.servlet.AsyncListener
      • onTimeout

        public void onTimeout​(javax.servlet.AsyncEvent event)
        Specified by:
        onTimeout in interface javax.servlet.AsyncListener
      • onError

        public void onError​(javax.servlet.AsyncEvent event)
        Specified by:
        onError in interface javax.servlet.AsyncListener
      • onStartAsync

        public void onStartAsync​(javax.servlet.AsyncEvent event)
        Specified by:
        onStartAsync in interface javax.servlet.AsyncListener
      • getAsyncRequest

        public static AsyncServletRequest getAsyncRequest​(javax.servlet.ServletRequest request)
        Look up the existing async request or create/ store a new request that be referenced later
        Parameters:
        request - the ServletRequest
        Returns:
        the existing or new ActiveMQAsyncRequest