Class ClientInvocation

  • All Implemented Interfaces:
    javax.ws.rs.client.Invocation
    Direct Known Subclasses:
    MpClientInvocation

    public class ClientInvocation
    extends Object
    implements javax.ws.rs.client.Invocation
    Version:
    $Revision: 1 $
    Author:
    Bill Burke
    • Method Detail

      • extractResult

        public static <T> T extractResult​(javax.ws.rs.core.GenericType<T> responseType,
                                          javax.ws.rs.core.Response response,
                                          Annotation[] annotations)
        Extracts result from response throwing an appropriate exception if not a successful response.
        Type Parameters:
        T - type
        Parameters:
        responseType - generic type
        response - response entity
        annotations - array of annotations
        Returns:
        extracted result of type T
      • 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 - type
        Parameters:
        response - response entity
        Returns:
        unreachable
      • setDelegatingOutputStream

        public void setDelegatingOutputStream​(DelegatingOutputStream delegatingOutputStream)
      • setEntityStream

        public void setEntityStream​(OutputStream entityStream)
      • getUri

        public URI getUri()
      • setUri

        public void setUri​(URI uri)
      • getEntityAnnotations

        public Annotation[] getEntityAnnotations()
      • setEntityAnnotations

        public void setEntityAnnotations​(Annotation[] entityAnnotations)
      • getMethod

        public String getMethod()
      • setMethod

        public void setMethod​(String method)
      • getMutableProperties

        public Map<String,​Object> getMutableProperties()
      • getEntity

        public Object getEntity()
      • getEntityGenericType

        public Type getEntityGenericType()
      • getEntityClass

        public Class<?> getEntityClass()
      • setEntity

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

        public void setEntityObject​(Object ent)
      • 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 ClientResponse invoke()
        Specified by:
        invoke in interface javax.ws.rs.client.Invocation
      • invoke

        public <T> T invoke​(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 Future<javax.ws.rs.core.Response> submit()
        Specified by:
        submit in interface javax.ws.rs.client.Invocation
      • submit

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

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

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

        public ExecutorService asyncInvocationExecutor()
      • submitCF

        public <T> CompletableFuture<T> submitCF​(javax.ws.rs.core.GenericType<T> responseType)
      • reactive

        public Optional<org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.ReactiveInvocation> reactive()
        If the client's HTTP engine implements ReactiveClientHttpEngine then you can access the latter's Publisher via this method.
      • property

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

        public void setClientInvoker​(ClientInvoker clientInvoker)
      • setActualTarget

        public void setActualTarget​(javax.ws.rs.client.WebTarget target)
      • getActualTarget

        public javax.ws.rs.client.WebTarget getActualTarget()