Class JerseyInvocation

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

    public class JerseyInvocation
    extends Object
    implements jakarta.ws.rs.client.Invocation
    Jersey implementation of JAX-RS client-side request invocation contract.
    Author:
    Marek Potociar
    • Method Detail

      • invoke

        public jakarta.ws.rs.core.Response invoke()
                                           throws jakarta.ws.rs.ProcessingException,
                                                  jakarta.ws.rs.WebApplicationException
        Specified by:
        invoke in interface jakarta.ws.rs.client.Invocation
        Throws:
        jakarta.ws.rs.ProcessingException
        jakarta.ws.rs.WebApplicationException
      • invoke

        public <T> T invoke​(Class<T> responseType)
                     throws jakarta.ws.rs.ProcessingException,
                            jakarta.ws.rs.WebApplicationException
        Specified by:
        invoke in interface jakarta.ws.rs.client.Invocation
        Throws:
        jakarta.ws.rs.ProcessingException
        jakarta.ws.rs.WebApplicationException
      • invoke

        public <T> T invoke​(jakarta.ws.rs.core.GenericType<T> responseType)
                     throws jakarta.ws.rs.ProcessingException,
                            jakarta.ws.rs.WebApplicationException
        Specified by:
        invoke in interface jakarta.ws.rs.client.Invocation
        Throws:
        jakarta.ws.rs.ProcessingException
        jakarta.ws.rs.WebApplicationException
      • submit

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

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

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

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

        public <T> Future<T> submit​(jakarta.ws.rs.core.GenericType<T> responseType,
                                    jakarta.ws.rs.client.InvocationCallback<T> callback)
        Submit the request for an asynchronous invocation and register an InvocationCallback to process the future result of the invocation.

        Response type in this case is taken from responseType param (if not null) rather than from callback. This allows to pass callbacks like new InvocationCallback&lt;&gt() {...}.

        Type Parameters:
        T - response type
        Parameters:
        responseType - response type that is used instead of obtaining types from callback.
        callback - invocation callback for asynchronous processing of the request invocation result.
        Returns:
        future response object of the specified type as a result of the request invocation.
      • property

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