Class AbstractRxInvoker<T>

  • Type Parameters:
    T - the asynchronous/event-based completion aware type. The given type should be parametrized with the actual response type.
    All Implemented Interfaces:
    RxInvoker<T>

    public abstract class AbstractRxInvoker<T>
    extends Object
    implements RxInvoker<T>
    Default implementation of reactive invoker. Extensions of this class are supposed to implement method(String, Entity, Class) and method(String, Entity, GenericType) methods to which implementations of the rest of the methods from the contract delegate to.
    Since:
    2.26
    Author:
    Michal Gajdos
    • Method Detail

      • getSyncInvoker

        protected SyncInvoker getSyncInvoker()
        Return invocation builder this reactive invoker was initialized with.
        Returns:
        non-null invocation builder.
      • getExecutorService

        protected ExecutorService getExecutorService()
        Return executorService service this reactive invoker was initialized with.
        Returns:
        executorService service instance or null.
      • method

        public T method​(String name)
        Description copied from interface: RxInvoker
        Invoke an arbitrary method for the current request.
        Specified by:
        method in interface RxInvoker<T>
        Parameters:
        name - method name.
        Returns:
        invocation response wrapped in the completion aware type..
      • method

        public <R> T method​(String name,
                            Class<R> responseType)
        Description copied from interface: RxInvoker
        Invoke an arbitrary method for the current request.
        Specified by:
        method in interface RxInvoker<T>
        Type Parameters:
        R - response entity type.
        Parameters:
        name - method name.
        responseType - Java type the response entity will be converted to.
        Returns:
        invocation response wrapped in the completion aware type..
      • method

        public <R> T method​(String name,
                            GenericType<R> responseType)
        Description copied from interface: RxInvoker
        Invoke an arbitrary method for the current request.
        Specified by:
        method in interface RxInvoker<T>
        Type Parameters:
        R - 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 wrapped in the completion aware type..
      • method

        public T method​(String name,
                        Entity<?> entity)
        Description copied from interface: RxInvoker
        Invoke an arbitrary method for the current request.
        Specified by:
        method in interface RxInvoker<T>
        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 wrapped in the completion aware type..
      • 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)
      • method

        public abstract <R> T method​(String name,
                                     Entity<?> entity,
                                     Class<R> responseType)