Class AsyncInputStream

java.lang.Object
org.apache.camel.component.platform.http.vertx.AsyncInputStream
All Implemented Interfaces:
io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer>, io.vertx.core.streams.StreamBase

public class AsyncInputStream extends Object implements io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer>
ReadStream that can process an InputStream in an asynchronous way, so that the content can be pumped to the WriteStream of an HttpServerResponse.
  • Constructor Details

    • AsyncInputStream

      public AsyncInputStream(io.vertx.core.Vertx vertx, io.vertx.core.Context context, InputStream inputStream)
  • Method Details

    • endHandler

      public AsyncInputStream endHandler(io.vertx.core.Handler<Void> endHandler)
      Specified by:
      endHandler in interface io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer>
    • exceptionHandler

      public AsyncInputStream exceptionHandler(io.vertx.core.Handler<Throwable> exceptionHandler)
      Specified by:
      exceptionHandler in interface io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer>
      Specified by:
      exceptionHandler in interface io.vertx.core.streams.StreamBase
    • handler

      public AsyncInputStream handler(io.vertx.core.Handler<io.vertx.core.buffer.Buffer> handler)
      Specified by:
      handler in interface io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer>
    • pause

      public AsyncInputStream pause()
      Specified by:
      pause in interface io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer>
    • resume

      public AsyncInputStream resume()
      Specified by:
      resume in interface io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer>
    • fetch

      public io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer> fetch(long amount)
      Specified by:
      fetch in interface io.vertx.core.streams.ReadStream<io.vertx.core.buffer.Buffer>
    • close

      public void close(io.vertx.core.Handler<io.vertx.core.AsyncResult<Void>> handler)