Top Description Methods
io.vertx.core

public Interface TimeoutStream

extends ReadStream<Long>
Known Direct Implementers
io.vertx.core.impl.VertxImpl.TimeoutStreamImpl
Annotations
@Deprecated
@VertxGen
Imports
io.vertx.codegen.annotations.VertxGen, io.vertx.core.streams.ReadStream

Deprecated

use Vertx#setTimer/Vertx#setPeriodic instead. RxJava like integrations should use the Vert.x scheduler integration.

A timeout stream is triggered by a timer, the io.vertx.core.Handler will be call when the timer is fired, it can be once or several times depending on the nature of the timer related to this stream. The ReadStream#endHandler(Handler) will be called after the timer handler has been called.

Pausing the timer inhibits the timer shots until the stream is resumed. Setting a null handler callback cancels the timer.

Author
Julien Viet

Method Summary

Modifier and TypeMethod and Description
public void
cancel()

Cancels the timeout.

public TimeoutStream
endHandler(Handler<Void> endHandler)
References Deprecated TimeoutStream is deprecated or references (maybe indirectly) at least one deprecated element.

public TimeoutStream
exceptionHandler(Handler<Throwable> handler)
References Deprecated TimeoutStream is deprecated or references (maybe indirectly) at least one deprecated element.

public TimeoutStream
fetch(long amount)

Redeclares io.vertx.core.streams.ReadStream.fetch.

References Deprecated TimeoutStream is deprecated or references (maybe indirectly) at least one deprecated element.

Fetch the specified amount of elements.

public TimeoutStream
handler(Handler<Long> handler)
References Deprecated TimeoutStream is deprecated or references (maybe indirectly) at least one deprecated element.

public TimeoutStream
pause()

Redeclares io.vertx.core.streams.ReadStream.pause.

References Deprecated TimeoutStream is deprecated or references (maybe indirectly) at least one deprecated element.

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

public TimeoutStream
resume()

Redeclares io.vertx.core.streams.ReadStream.resume.

References Deprecated TimeoutStream is deprecated or references (maybe indirectly) at least one deprecated element.

Resume reading, and sets the buffer in flowing mode.

Inherited from io.vertx.core.streams.ReadStream:
collectendHandlerexceptionHandlerhandlerpipepipeTopipeTo

Method Detail

cancelback to summary
public void cancel()

Cancels the timeout. Note this has the same effect as calling handler(Handler) with a null argument.

endHandlerback to summary
public TimeoutStream endHandler(Handler<Void> endHandler)

References Deprecated

TimeoutStream is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Annotations
@Override
exceptionHandlerback to summary
public TimeoutStream exceptionHandler(Handler<Throwable> handler)

References Deprecated

TimeoutStream is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Annotations
@Override
fetchback to summary
public TimeoutStream fetch(long amount)

Redeclares io.vertx.core.streams.ReadStream.fetch.

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

References Deprecated

TimeoutStream is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

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:TimeoutStream

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

Annotations
@Override
handlerback to summary
public TimeoutStream handler(Handler<Long> handler)

References Deprecated

TimeoutStream is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Annotations
@Override
pauseback to summary
public TimeoutStream pause()

Redeclares io.vertx.core.streams.ReadStream.pause.

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

References Deprecated

TimeoutStream is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

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:TimeoutStream

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

Annotations
@Override
resumeback to summary
public TimeoutStream resume()

Redeclares io.vertx.core.streams.ReadStream.resume.

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

References Deprecated

TimeoutStream is deprecated or references (maybe indirectly) at least one deprecated element.

See corresponding docs for further information.

Resume reading, and sets the buffer in flowing mode.

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

Returns:TimeoutStream

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

Annotations
@Override