Class AsyncResponseJunitTest

  • All Implemented Interfaces:
    javax.ws.rs.container.AsyncResponse

    public class AsyncResponseJunitTest
    extends java.lang.Object
    implements javax.ws.rs.container.AsyncResponse
    Minimal implementation for AsyncResponse Tests in Junit
    • Field Summary

      • Fields inherited from interface javax.ws.rs.container.AsyncResponse

        NO_TIMEOUT
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean cancel()  
      boolean cancel​(int retryAfter)  
      boolean cancel​(java.util.Date retryAfter)  
      java.lang.Object getResponse()  
      boolean isCancelled()  
      boolean isDone()  
      boolean isSuspended()  
      java.util.Collection<java.lang.Class<?>> register​(java.lang.Class<?> callback)  
      java.util.Map<java.lang.Class<?>,​java.util.Collection<java.lang.Class<?>>> register​(java.lang.Class<?> callback, java.lang.Class<?>... callbacks)  
      java.util.Collection<java.lang.Class<?>> register​(java.lang.Object callback)  
      java.util.Map<java.lang.Class<?>,​java.util.Collection<java.lang.Class<?>>> register​(java.lang.Object callback, java.lang.Object... callbacks)  
      boolean resume​(java.lang.Object response)  
      boolean resume​(java.lang.Throwable response)  
      boolean setTimeout​(long time, java.util.concurrent.TimeUnit unit)  
      void setTimeoutHandler​(javax.ws.rs.container.TimeoutHandler handler)  
      • Methods inherited from class java.lang.Object

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

      • AsyncResponseJunitTest

        public AsyncResponseJunitTest()
    • Method Detail

      • resume

        public boolean resume​(java.lang.Object response)
        Specified by:
        resume in interface javax.ws.rs.container.AsyncResponse
      • getResponse

        public java.lang.Object getResponse()
      • resume

        public boolean resume​(java.lang.Throwable response)
        Specified by:
        resume in interface javax.ws.rs.container.AsyncResponse
      • cancel

        public boolean cancel()
        Specified by:
        cancel in interface javax.ws.rs.container.AsyncResponse
      • cancel

        public boolean cancel​(int retryAfter)
        Specified by:
        cancel in interface javax.ws.rs.container.AsyncResponse
      • cancel

        public boolean cancel​(java.util.Date retryAfter)
        Specified by:
        cancel in interface javax.ws.rs.container.AsyncResponse
      • isSuspended

        public boolean isSuspended()
        Specified by:
        isSuspended in interface javax.ws.rs.container.AsyncResponse
      • isCancelled

        public boolean isCancelled()
        Specified by:
        isCancelled in interface javax.ws.rs.container.AsyncResponse
      • isDone

        public boolean isDone()
        Specified by:
        isDone in interface javax.ws.rs.container.AsyncResponse
      • setTimeout

        public boolean setTimeout​(long time,
                                  java.util.concurrent.TimeUnit unit)
        Specified by:
        setTimeout in interface javax.ws.rs.container.AsyncResponse
      • setTimeoutHandler

        public void setTimeoutHandler​(javax.ws.rs.container.TimeoutHandler handler)
        Specified by:
        setTimeoutHandler in interface javax.ws.rs.container.AsyncResponse
      • register

        public java.util.Collection<java.lang.Class<?>> register​(java.lang.Class<?> callback)
        Specified by:
        register in interface javax.ws.rs.container.AsyncResponse
      • register

        public java.util.Map<java.lang.Class<?>,​java.util.Collection<java.lang.Class<?>>> register​(java.lang.Class<?> callback,
                                                                                                         java.lang.Class<?>... callbacks)
        Specified by:
        register in interface javax.ws.rs.container.AsyncResponse
      • register

        public java.util.Collection<java.lang.Class<?>> register​(java.lang.Object callback)
        Specified by:
        register in interface javax.ws.rs.container.AsyncResponse
      • register

        public java.util.Map<java.lang.Class<?>,​java.util.Collection<java.lang.Class<?>>> register​(java.lang.Object callback,
                                                                                                         java.lang.Object... callbacks)
        Specified by:
        register in interface javax.ws.rs.container.AsyncResponse