Class CustomSseAsyncConsumer

java.lang.Object
org.apache.hc.core5.http.nio.entity.AbstractCharDataConsumer
org.apache.hc.client5.http.async.methods.AbstractCharResponseConsumer<SseResponse>
com.luna.common.net.async.CustomSseAsyncConsumer
All Implemented Interfaces:
org.apache.hc.core5.http.nio.AsyncDataConsumer, org.apache.hc.core5.http.nio.AsyncResponseConsumer<SseResponse>, org.apache.hc.core5.http.nio.ResourceHolder

public class CustomSseAsyncConsumer extends org.apache.hc.client5.http.async.methods.AbstractCharResponseConsumer<SseResponse>
Author:
luna
Description:
  • Constructor Details

  • Method Details

    • start

      protected void start(org.apache.hc.core5.http.HttpResponse response, org.apache.hc.core5.http.ContentType contentType) throws org.apache.hc.core5.http.HttpException, IOException
      Specified by:
      start in class org.apache.hc.client5.http.async.methods.AbstractCharResponseConsumer<SseResponse>
      Throws:
      org.apache.hc.core5.http.HttpException
      IOException
    • capacityIncrement

      protected int capacityIncrement()
      Specified by:
      capacityIncrement in class org.apache.hc.core5.http.nio.entity.AbstractCharDataConsumer
    • data

      protected void data(CharBuffer data, boolean endOfStream) throws IOException
      Specified by:
      data in class org.apache.hc.core5.http.nio.entity.AbstractCharDataConsumer
      Throws:
      IOException
    • buildResult

      protected SseResponse buildResult()
      Specified by:
      buildResult in class org.apache.hc.client5.http.async.methods.AbstractCharResponseConsumer<SseResponse>
    • releaseResources

      public void releaseResources()
    • failed

      public void failed(Exception cause)
      Specified by:
      failed in interface org.apache.hc.core5.http.nio.AsyncResponseConsumer<SseResponse>
      Overrides:
      failed in class org.apache.hc.client5.http.async.methods.AbstractCharResponseConsumer<SseResponse>