Class ResponseListenerPublisher<T>

  • All Implemented Interfaces:
    EventListener, org.eclipse.jetty.client.api.Response.AsyncContentListener, org.eclipse.jetty.client.api.Response.BeginListener, org.eclipse.jetty.client.api.Response.CompleteListener, org.eclipse.jetty.client.api.Response.ContentListener, org.eclipse.jetty.client.api.Response.FailureListener, org.eclipse.jetty.client.api.Response.HeaderListener, org.eclipse.jetty.client.api.Response.HeadersListener, org.eclipse.jetty.client.api.Response.Listener, org.eclipse.jetty.client.api.Response.ResponseListener, org.eclipse.jetty.client.api.Response.SuccessListener, org.reactivestreams.Processor<T,T>, org.reactivestreams.Publisher<T>, org.reactivestreams.Subscriber<T>, org.reactivestreams.Subscription

    public class ResponseListenerPublisher<T>
    extends AbstractSingleProcessor<T,T>
    implements org.eclipse.jetty.client.api.Response.Listener
    A Publisher that listens for response events. When this Publisher is demanded data, it first sends the request and produces no data. When the response arrives, the application is invoked and an application Publisher is returned to this implementation. Any further data demand to this Publisher is forwarded to the application Publisher. In turn, the application Publisher produces data that is forwarded to the subscriber of this Publisher.
    • Method Detail

      • onBegin

        public void onBegin​(org.eclipse.jetty.client.api.Response response)
        Specified by:
        onBegin in interface org.eclipse.jetty.client.api.Response.BeginListener
      • onHeader

        public boolean onHeader​(org.eclipse.jetty.client.api.Response response,
                                org.eclipse.jetty.http.HttpField field)
        Specified by:
        onHeader in interface org.eclipse.jetty.client.api.Response.HeaderListener
      • onHeaders

        public void onHeaders​(org.eclipse.jetty.client.api.Response response)
        Specified by:
        onHeaders in interface org.eclipse.jetty.client.api.Response.HeadersListener
      • onContent

        public void onContent​(org.eclipse.jetty.client.api.Response response,
                              ByteBuffer buffer,
                              org.eclipse.jetty.util.Callback callback)
        Specified by:
        onContent in interface org.eclipse.jetty.client.api.Response.AsyncContentListener
      • onContent

        public void onContent​(org.eclipse.jetty.client.api.Response response,
                              ByteBuffer content)
        Specified by:
        onContent in interface org.eclipse.jetty.client.api.Response.ContentListener
      • onSuccess

        public void onSuccess​(org.eclipse.jetty.client.api.Response response)
        Specified by:
        onSuccess in interface org.eclipse.jetty.client.api.Response.SuccessListener
      • onFailure

        public void onFailure​(org.eclipse.jetty.client.api.Response response,
                              Throwable failure)
        Specified by:
        onFailure in interface org.eclipse.jetty.client.api.Response.FailureListener
      • onComplete

        public void onComplete​(org.eclipse.jetty.client.api.Result result)
        Specified by:
        onComplete in interface org.eclipse.jetty.client.api.Response.CompleteListener
      • onNext

        public void onNext​(T t)
        Specified by:
        onNext in interface org.reactivestreams.Subscriber<T>