Class TimeoutStream
- java.lang.Object
-
- io.vertx.mutiny.core.TimeoutStream
-
- All Implemented Interfaces:
ReadStream<Long>
,StreamBase
public class TimeoutStream extends Object implements ReadStream<Long>
A timeout stream is triggered by a timer, theHandler
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 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.
NOTE: This class has been automatically generated from theoriginal
non Mutiny-ified interface using Vert.x codegen.
-
-
Field Summary
Fields Modifier and Type Field Description static TypeArg<TimeoutStream>
__TYPE_ARG
-
Constructor Summary
Constructors Constructor Description TimeoutStream(io.vertx.core.TimeoutStream delegate)
TimeoutStream(Object delegate)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
cancel()
Deprecated.TimeoutStream
endHandler(Runnable endHandler)
Deprecated.boolean
equals(Object o)
TimeoutStream
exceptionHandler(Consumer<Throwable> handler)
Deprecated.TimeoutStream
fetch(long amount)
Deprecated.io.vertx.core.TimeoutStream
getDelegate()
TimeoutStream
handler(Consumer<Long> handler)
Deprecated.int
hashCode()
static TimeoutStream
newInstance(io.vertx.core.TimeoutStream arg)
TimeoutStream
pause()
Deprecated.Pipe<Long>
pipe()
Deprecated.io.smallrye.mutiny.Uni<Void>
pipeTo(WriteStream<Long> dst)
Deprecated.Void
pipeToAndAwait(WriteStream<Long> dst)
Deprecated.void
pipeToAndForget(WriteStream<Long> dst)
Deprecated.TimeoutStream
resume()
Deprecated.Iterable<Long>
toBlockingIterable()
Stream<Long>
toBlockingStream()
io.smallrye.mutiny.Multi<Long>
toMulti()
String
toString()
-
-
-
Field Detail
-
__TYPE_ARG
public static final TypeArg<TimeoutStream> __TYPE_ARG
-
-
Constructor Detail
-
TimeoutStream
public TimeoutStream(io.vertx.core.TimeoutStream delegate)
-
TimeoutStream
public TimeoutStream(Object delegate)
-
-
Method Detail
-
getDelegate
public io.vertx.core.TimeoutStream getDelegate()
- Specified by:
getDelegate
in interfaceReadStream<Long>
- Specified by:
getDelegate
in interfaceStreamBase
-
pipe
@Deprecated public Pipe<Long> pipe()
Deprecated.- Specified by:
pipe
in interfaceReadStream<Long>
- Returns:
- a pipe
-
pipeTo
@CheckReturnValue @Deprecated public io.smallrye.mutiny.Uni<Void> pipeTo(WriteStream<Long> dst)
Deprecated.Pipe thisReadStream
to theWriteStream
.Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the
handler
will be called with the result.Unlike the bare Vert.x variant, this method returns a
Uni
. Don't forget to subscribe on it to trigger the operation.- Specified by:
pipeTo
in interfaceReadStream<Long>
- Parameters:
dst
- the destination write stream- Returns:
- the
uni
firing the result of the operation when completed, or a failure if the operation failed.
-
pipeToAndAwait
@Deprecated public Void pipeToAndAwait(WriteStream<Long> dst)
Deprecated.Blocking variant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)
.This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Specified by:
pipeToAndAwait
in interfaceReadStream<Long>
- Parameters:
dst
- the destination write stream- Returns:
- the Void instance produced by the operation.
-
pipeToAndForget
@Deprecated public void pipeToAndForget(WriteStream<Long> dst)
Deprecated.Variant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)
that ignores the result of the operation.This method subscribes on the result of
ReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)
, but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)
but you don't need to compose it with other operations.- Specified by:
pipeToAndForget
in interfaceReadStream<Long>
- Parameters:
dst
- the destination write stream
-
exceptionHandler
@Deprecated public TimeoutStream exceptionHandler(Consumer<Throwable> handler)
Deprecated.- Specified by:
exceptionHandler
in interfaceReadStream<Long>
- Specified by:
exceptionHandler
in interfaceStreamBase
- Parameters:
handler
- the exception handler- Returns:
-
handler
@Deprecated public TimeoutStream handler(Consumer<Long> handler)
Deprecated.- Specified by:
handler
in interfaceReadStream<Long>
- Returns:
-
pause
@Deprecated public TimeoutStream pause()
Deprecated.- Specified by:
pause
in interfaceReadStream<Long>
- Returns:
- a reference to this, so the API can be used fluently
-
resume
@Deprecated public TimeoutStream resume()
Deprecated.- Specified by:
resume
in interfaceReadStream<Long>
- Returns:
- a reference to this, so the API can be used fluently
-
fetch
@Deprecated public TimeoutStream fetch(long amount)
Deprecated.- Specified by:
fetch
in interfaceReadStream<Long>
- Returns:
- a reference to this, so the API can be used fluently
-
endHandler
@Deprecated public TimeoutStream endHandler(Runnable endHandler)
Deprecated.- Specified by:
endHandler
in interfaceReadStream<Long>
- Returns:
-
cancel
@Deprecated public void cancel()
Deprecated.
-
toMulti
@CheckReturnValue public io.smallrye.mutiny.Multi<Long> toMulti()
- Specified by:
toMulti
in interfaceReadStream<Long>
-
newInstance
public static TimeoutStream newInstance(io.vertx.core.TimeoutStream arg)
-
-