Top Description Fields Constructors Methods
io.vertx.core.eventbus.impl

public Class BodyReadStream<T>

extends Object
implements ReadStream<T>
Class Inheritance
All Implemented Interfaces
io.vertx.core.streams.ReadStream, io.vertx.core.streams.StreamBase
Imports
io.vertx.core.Handler, io.vertx.core.eventbus.Message, io.vertx.core.streams.ReadStream

A body stream that transform a ReadStream<Message<T>> into a ReadStream<T>.
Author
Julien Viet

Field Summary

Modifier and TypeField and Description
private ReadStream<Message<T>>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public ReadStream<T>
endHandler(Handler<Void> endHandler)

public ReadStream<T>
public ReadStream<T>
fetch(long amount)

Implements io.vertx.core.streams.ReadStream.fetch.

Fetch the specified amount of elements.

public ReadStream<T>
handler(Handler<T> handler)

public ReadStream<T>
pause()

Implements io.vertx.core.streams.ReadStream.pause.

Pause the ReadStream, it sets the buffer in fetch mode and clears the actual demand.

public ReadStream<T>
resume()

Implements io.vertx.core.streams.ReadStream.resume.

Resume reading, and sets the buffer in flowing mode.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

delegateback to summary
private ReadStream<Message<T>> delegate

Constructor Detail

BodyReadStreamback to summary
public BodyReadStream(ReadStream<Message<T>> delegate)

Method Detail

endHandlerback to summary
public ReadStream<T> endHandler(Handler<Void> endHandler)
Annotations
@Override
exceptionHandlerback to summary
public ReadStream<T> exceptionHandler(Handler<Throwable> handler)
Annotations
@Override
fetchback to summary
public ReadStream<T> fetch(long amount)

Implements io.vertx.core.streams.ReadStream.fetch.

Doc from io.vertx.core.streams.ReadStream.fetch.

Fetch the specified amount of elements. If the ReadStream has been paused, reading will recommence with the specified amount of items, otherwise the specified amount will be added to the current stream demand.

Returns:ReadStream<T>

a reference to this, so the API can be used fluently

Annotations
@Override
handlerback to summary
public ReadStream<T> handler(Handler<T> handler)
Annotations
@Override
pauseback to summary
public ReadStream<T> pause()

Implements io.vertx.core.streams.ReadStream.pause.

Doc from io.vertx.core.streams.ReadStream.pause.

Pause the ReadStream, it sets the buffer in fetch mode and clears the actual demand.

While it's paused, no data will be sent to the data handler.

Returns:ReadStream<T>

a reference to this, so the API can be used fluently

Annotations
@Override
resumeback to summary
public ReadStream<T> resume()

Implements io.vertx.core.streams.ReadStream.resume.

Doc from io.vertx.core.streams.ReadStream.resume.

Resume reading, and sets the buffer in flowing mode.

If the ReadStream has been paused, reading will recommence on it.

Returns:ReadStream<T>

a reference to this, so the API can be used fluently

Annotations
@Override