Class StreamRequest<T extends StreamResponse>

    • Constructor Summary

      Constructors 
      Constructor Description
      StreamRequest()  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract retrofit2.Call<T> generateCall()  
      T request()
      Executes the request
      void requestAsync​(java.util.function.Consumer<T> onSuccess, java.util.function.Consumer<StreamException> onError)
      Executes the request asynchronously
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • StreamRequest

        public StreamRequest()
    • Method Detail

      • request

        @NotNull
        public T request()
                  throws StreamException
        Executes the request
        Returns:
        the channel update response
        Throws:
        StreamException - when IO problem occurs or the stream API return an error
      • requestAsync

        public void requestAsync​(@Nullable
                                 java.util.function.Consumer<T> onSuccess,
                                 @Nullable
                                 java.util.function.Consumer<StreamException> onError)
        Executes the request asynchronously
        Parameters:
        onSuccess - executed when the request is successful
        onError - executed when IO problem occurs or the stream API return an error