Class JerseyCompletionStageRxInvoker

    • Method Detail

      • method

        public <T> CompletableFuture<T> method​(String name,
                                               Class<T> responseType)
        Description copied from interface: AsyncInvoker
        Invoke an arbitrary method for the current request asynchronously.

        Note that calling the Future.get() method on the returned Future instance may throw an ExecutionException that wraps either a ProcessingException thrown in case of an invocation processing failure or a WebApplicationException or one of its subclasses thrown in case the received response status code is not successful and the specified response type is not Response. In case a processing of a properly received response fails, the wrapped processing exception will be of ResponseProcessingException type and will contain the Response instance whose processing has failed.

        Specified by:
        method in interface AsyncInvoker
        Type Parameters:
        T - response entity type.
        Parameters:
        name - method name.
        responseType - Java type the response entity will be converted to.
        Returns:
        invocation response future.
      • method

        public <T> CompletableFuture<T> method​(String name,
                                               GenericType<T> responseType)
        Description copied from interface: AsyncInvoker
        Invoke an arbitrary method for the current request asynchronously.

        Note that calling the Future.get() method on the returned Future instance may throw an ExecutionException that wraps either a ProcessingException thrown in case of an invocation processing failure or a WebApplicationException or one of its subclasses thrown in case the received response status code is not successful and the specified response type is not Response. In case a processing of a properly received response fails, the wrapped processing exception will be of ResponseProcessingException type and will contain the Response instance whose processing has failed.

        Specified by:
        method in interface AsyncInvoker
        Type Parameters:
        T - generic response entity type.
        Parameters:
        name - method name.
        responseType - representation of a generic Java type the response entity will be converted to.
        Returns:
        invocation response future.
      • method

        public <T> CompletableFuture<T> method​(String name,
                                               InvocationCallback<T> callback)
        Description copied from interface: AsyncInvoker
        Invoke an arbitrary method for the current request asynchronously.

        Note that calling the Future.get() method on the returned Future instance may throw an ExecutionException that wraps either a ProcessingException thrown in case of an invocation processing failure or a WebApplicationException or one of its subclasses thrown in case the received response status code is not successful and the generic type of the supplied response callback is not Response. In case a processing of a properly received response fails, the wrapped processing exception will be of ResponseProcessingException type and will contain the Response instance whose processing has failed.

        Specified by:
        method in interface AsyncInvoker
        Type Parameters:
        T - generic response entity type.
        Parameters:
        name - method name.
        callback - asynchronous invocation callback.
        Returns:
        invocation response future.
      • method

        public CompletableFuture<Response> method​(String name,
                                                  Entity<?> entity)
        Description copied from interface: AsyncInvoker
        Invoke an arbitrary method for the current request asynchronously.

        Note that calling the Future.get() method on the returned Future instance may throw an ExecutionException that wraps a ProcessingException thrown in case of an invocation processing failure. In case a processing of a properly received response fails, the wrapped processing exception will be of ResponseProcessingException type and will contain the Response instance whose processing has failed.

        Specified by:
        method in interface AsyncInvoker
        Parameters:
        name - method name.
        entity - request entity, including it's full Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.
        Returns:
        invocation response future.
      • method

        public <T> CompletableFuture<T> method​(String name,
                                               Entity<?> entity,
                                               Class<T> responseType)
        Description copied from interface: AsyncInvoker
        Invoke an arbitrary method for the current request asynchronously.

        Note that calling the Future.get() method on the returned Future instance may throw an ExecutionException that wraps either a ProcessingException thrown in case of an invocation processing failure or a WebApplicationException or one of its subclasses thrown in case the received response status code is not successful and the specified response type is not Response. In case a processing of a properly received response fails, the wrapped processing exception will be of ResponseProcessingException type and will contain the Response instance whose processing has failed.

        Specified by:
        method in interface AsyncInvoker
        Type Parameters:
        T - response entity type.
        Parameters:
        name - method name.
        entity - request entity, including it's full Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.
        responseType - Java type the response entity will be converted to.
        Returns:
        invocation response future.
      • method

        public <T> CompletableFuture<T> method​(String name,
                                               Entity<?> entity,
                                               GenericType<T> responseType)
        Description copied from interface: AsyncInvoker
        Invoke an arbitrary method for the current request asynchronously.

        Note that calling the Future.get() method on the returned Future instance may throw an ExecutionException that wraps either a ProcessingException thrown in case of an invocation processing failure or a WebApplicationException or one of its subclasses thrown in case the received response status code is not successful and the specified response type is not Response. In case a processing of a properly received response fails, the wrapped processing exception will be of ResponseProcessingException type and will contain the Response instance whose processing has failed.

        Specified by:
        method in interface AsyncInvoker
        Type Parameters:
        T - generic response entity type.
        Parameters:
        name - method name.
        entity - request entity, including it's full Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.
        responseType - representation of a generic Java type the response entity will be converted to.
        Returns:
        invocation response future.
      • method

        public <T> CompletableFuture<T> method​(String name,
                                               Entity<?> entity,
                                               InvocationCallback<T> callback)
        Description copied from interface: AsyncInvoker
        Invoke an arbitrary method for the current request asynchronously.

        Note that calling the Future.get() method on the returned Future instance may throw an ExecutionException that wraps either a ProcessingException thrown in case of an invocation processing failure or a WebApplicationException or one of its subclasses thrown in case the received response status code is not successful and the generic type of the supplied response callback is not Response. In case a processing of a properly received response fails, the wrapped processing exception will be of ResponseProcessingException type and will contain the Response instance whose processing has failed.

        Specified by:
        method in interface AsyncInvoker
        Type Parameters:
        T - generic response entity type.
        Parameters:
        name - method name.
        entity - request entity, including it's full Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.
        callback - asynchronous invocation callback.
        Returns:
        invocation response future.
      • get

        public <R> CompletableFuture<R> get​(InvocationCallback<R> callback)
        Description copied from interface: AsyncInvoker
        Invoke HTTP GET method for the current request asynchronously.

        Note that calling the Future.get() method on the returned Future instance may throw an ExecutionException that wraps either a ProcessingException thrown in case of an invocation processing failure or a WebApplicationException or one of its subclasses thrown in case the received response status code is not successful and the generic type of the supplied response callback is not Response. In case a processing of a properly received response fails, the wrapped processing exception will be of ResponseProcessingException type and will contain the Response instance whose processing has failed.

        Specified by:
        get in interface AsyncInvoker
        Type Parameters:
        R - generic response entity type.
        Parameters:
        callback - asynchronous invocation callback.
        Returns:
        invocation response future.
      • put

        public <R> CompletableFuture<R> put​(Entity<?> entity,
                                            InvocationCallback<R> callback)
        Description copied from interface: AsyncInvoker
        Invoke HTTP PUT method for the current request asynchronously.

        Note that calling the Future.get() method on the returned Future instance may throw an ExecutionException that wraps either a ProcessingException thrown in case of an invocation processing failure or a WebApplicationException or one of its subclasses thrown in case the received response status code is not successful and the generic type of the supplied response callback is not Response. In case a processing of a properly received response fails, the wrapped processing exception will be of ResponseProcessingException type and will contain the Response instance whose processing has failed.

        Specified by:
        put in interface AsyncInvoker
        Type Parameters:
        R - generic response entity type.
        Parameters:
        entity - request entity, including it's full Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.
        callback - asynchronous invocation callback.
        Returns:
        invocation response future.
      • post

        public <R> CompletableFuture<R> post​(Entity<?> entity,
                                             InvocationCallback<R> callback)
        Description copied from interface: AsyncInvoker
        Invoke HTTP POST method for the current request asynchronously.

        Note that calling the Future.get() method on the returned Future instance may throw an ExecutionException that wraps either a ProcessingException thrown in case of an invocation processing failure or a WebApplicationException or one of its subclasses thrown in case the received response status code is not successful and the generic type of the supplied response callback is not Response. In case a processing of a properly received response fails, the wrapped processing exception will be of ResponseProcessingException type and will contain the Response instance whose processing has failed.

        Specified by:
        post in interface AsyncInvoker
        Type Parameters:
        R - generic response entity type.
        Parameters:
        entity - request entity, including it's full Variant information. Any variant-related HTTP headers previously set (namely Content-Type, Content-Language and Content-Encoding) will be overwritten using the entity variant information.
        callback - asynchronous invocation callback.
        Returns:
        invocation response future.
      • delete

        public <R> CompletableFuture<R> delete​(InvocationCallback<R> callback)
        Description copied from interface: AsyncInvoker
        Invoke HTTP DELETE method for the current request asynchronously.

        Note that calling the Future.get() method on the returned Future instance may throw an ExecutionException that wraps either a ProcessingException thrown in case of an invocation processing failure or a WebApplicationException or one of its subclasses thrown in case the received response status code is not successful and the generic type of the supplied response callback is not Response. In case a processing of a properly received response fails, the wrapped processing exception will be of ResponseProcessingException type and will contain the Response instance whose processing has failed.

        Specified by:
        delete in interface AsyncInvoker
        Type Parameters:
        R - generic response entity type.
        Parameters:
        callback - asynchronous invocation callback.
        Returns:
        invocation response future.
      • options

        public <R> CompletableFuture<R> options​(InvocationCallback<R> callback)
        Description copied from interface: AsyncInvoker
        Invoke HTTP OPTIONS method for the current request asynchronously.

        Note that calling the Future.get() method on the returned Future instance may throw an ExecutionException that wraps either a ProcessingException thrown in case of an invocation processing failure or a WebApplicationException or one of its subclasses thrown in case the received response status code is not successful and the generic type of the supplied response callback is not Response. In case a processing of a properly received response fails, the wrapped processing exception will be of ResponseProcessingException type and will contain the Response instance whose processing has failed.

        Specified by:
        options in interface AsyncInvoker
        Type Parameters:
        R - generic response entity type.
        Parameters:
        callback - asynchronous invocation callback.
        Returns:
        invocation response future.
      • trace

        public <R> CompletableFuture<R> trace​(InvocationCallback<R> callback)
        Description copied from interface: AsyncInvoker
        Invoke HTTP TRACE method for the current request asynchronously.

        Note that calling the Future.get() method on the returned Future instance may throw an ExecutionException that wraps either a ProcessingException thrown in case of an invocation processing failure or a WebApplicationException or one of its subclasses thrown in case the received response status code is not successful and the generic type of the supplied response callback is not Response. In case a processing of a properly received response fails, the wrapped processing exception will be of ResponseProcessingException type and will contain the Response instance whose processing has failed.

        Specified by:
        trace in interface AsyncInvoker
        Type Parameters:
        R - generic response entity type.
        Parameters:
        callback - asynchronous invocation callback.
        Returns:
        invocation response future.
      • get

        public T get()
      • get

        public <R> T get​(Class<R> responseType)
      • put

        public T put​(Entity<?> entity)
      • put

        public <R> T put​(Entity<?> entity,
                         Class<R> clazz)
      • post

        public T post​(Entity<?> entity)
      • post

        public <R> T post​(Entity<?> entity,
                          Class<R> clazz)
      • delete

        public T delete()
      • delete

        public <R> T delete​(Class<R> responseType)
      • delete

        public <R> T delete​(GenericType<R> responseType)
      • head

        public T head()
      • options

        public T options()
      • options

        public <R> T options​(Class<R> responseType)
      • options

        public <R> T options​(GenericType<R> responseType)
      • trace

        public T trace()
      • trace

        public <R> T trace​(Class<R> responseType)
      • trace

        public <R> T trace​(GenericType<R> responseType)