Class ClientInvocation

  • All Implemented Interfaces:
    javax.ws.rs.client.Invocation

    public class ClientInvocation
    extends java.lang.Object
    implements javax.ws.rs.client.Invocation
    Version:
    $Revision: 1 $
    • Field Detail

      • method

        protected java.lang.String method
      • entity

        protected java.lang.Object entity
      • entityGenericType

        protected java.lang.reflect.Type entityGenericType
      • entityClass

        protected java.lang.Class<?> entityClass
      • entityAnnotations

        protected java.lang.annotation.Annotation[] entityAnnotations
      • uri

        protected java.net.URI uri
      • chunked

        protected boolean chunked
      • entityStream

        protected java.io.OutputStream entityStream
    • Method Detail

      • extractResult

        public static <T> T extractResult​(javax.ws.rs.core.GenericType<T> responseType,
                                          javax.ws.rs.core.Response response,
                                          java.lang.annotation.Annotation[] annotations)
        Extracts result from response throwing an appropriate exception if not a successful response.
        Type Parameters:
        T -
        Parameters:
        responseType -
        response -
        annotations -
        Returns:
      • handleErrorStatus

        public static <T> T handleErrorStatus​(javax.ws.rs.core.Response response)
        Throw an exception. Expecting a status of 400 or greater.
        Type Parameters:
        T -
        Parameters:
        response -
        Returns:
      • setDelegatingOutputStream

        public void setDelegatingOutputStream​(DelegatingOutputStream delegatingOutputStream)
      • getEntityStream

        public java.io.OutputStream getEntityStream()
      • setEntityStream

        public void setEntityStream​(java.io.OutputStream entityStream)
      • getUri

        public java.net.URI getUri()
      • setUri

        public void setUri​(java.net.URI uri)
      • getEntityAnnotations

        public java.lang.annotation.Annotation[] getEntityAnnotations()
      • setEntityAnnotations

        public void setEntityAnnotations​(java.lang.annotation.Annotation[] entityAnnotations)
      • getMethod

        public java.lang.String getMethod()
      • setMethod

        public void setMethod​(java.lang.String method)
      • getMutableProperties

        public java.util.Map<java.lang.String,​java.lang.Object> getMutableProperties()
      • getEntity

        public java.lang.Object getEntity()
      • getEntityGenericType

        public java.lang.reflect.Type getEntityGenericType()
      • getEntityClass

        public java.lang.Class<?> getEntityClass()
      • setEntity

        public void setEntity​(javax.ws.rs.client.Entity<?> entity)
      • setEntityObject

        public void setEntityObject​(java.lang.Object ent)
      • writeRequestBody

        public void writeRequestBody​(java.io.OutputStream outputStream)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • getWriterInterceptors

        public javax.ws.rs.ext.WriterInterceptor[] getWriterInterceptors()
      • getRequestFilters

        public javax.ws.rs.client.ClientRequestFilter[] getRequestFilters()
      • getResponseFilters

        public javax.ws.rs.client.ClientResponseFilter[] getResponseFilters()
      • getConfiguration

        public javax.ws.rs.core.Configuration getConfiguration()
      • isChunked

        public boolean isChunked()
      • setChunked

        public void setChunked​(boolean chunked)
      • invoke

        public javax.ws.rs.core.Response invoke()
        Specified by:
        invoke in interface javax.ws.rs.client.Invocation
      • invoke

        public <T> T invoke​(java.lang.Class<T> responseType)
        Specified by:
        invoke in interface javax.ws.rs.client.Invocation
      • invoke

        public <T> T invoke​(javax.ws.rs.core.GenericType<T> responseType)
        Specified by:
        invoke in interface javax.ws.rs.client.Invocation
      • submit

        public java.util.concurrent.Future<javax.ws.rs.core.Response> submit()
        Specified by:
        submit in interface javax.ws.rs.client.Invocation
      • submit

        public <T> java.util.concurrent.Future<T> submit​(java.lang.Class<T> responseType)
        Specified by:
        submit in interface javax.ws.rs.client.Invocation
      • submit

        public <T> java.util.concurrent.Future<T> submit​(javax.ws.rs.core.GenericType<T> responseType)
        Specified by:
        submit in interface javax.ws.rs.client.Invocation
      • submit

        public <T> java.util.concurrent.Future<T> submit​(javax.ws.rs.client.InvocationCallback<T> callback)
        Specified by:
        submit in interface javax.ws.rs.client.Invocation
      • property

        public javax.ws.rs.client.Invocation property​(java.lang.String name,
                                                      java.lang.Object value)
        Specified by:
        property in interface javax.ws.rs.client.Invocation