public class AsyncChannelPromise extends AsyncPromise<java.lang.Void> implements io.netty.channel.ChannelPromise
AsyncPromise
and ChannelPromise
This class is all boiler plate, just ensuring we return ourselves and invoke the correct Promise method.Constructor and Description |
---|
AsyncChannelPromise(io.netty.channel.Channel channel) |
Modifier and Type | Method and Description |
---|---|
io.netty.channel.ChannelPromise |
addListener(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener) |
io.netty.channel.ChannelPromise |
addListeners(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>>... listeners) |
io.netty.channel.ChannelPromise |
await() |
io.netty.channel.ChannelPromise |
awaitUninterruptibly() |
io.netty.channel.Channel |
channel() |
boolean |
isVoid() |
io.netty.channel.ChannelPromise |
removeListener(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener) |
io.netty.channel.ChannelPromise |
removeListeners(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>>... listeners) |
io.netty.channel.ChannelPromise |
setFailure(java.lang.Throwable throwable) |
io.netty.channel.ChannelPromise |
setSuccess() |
io.netty.channel.ChannelPromise |
setSuccess(java.lang.Void v) |
io.netty.channel.ChannelPromise |
sync()
waits for completion; in case of failure rethrows the original exception without a new wrapping exception
so may cause problems for reporting stack traces
|
io.netty.channel.ChannelPromise |
syncUninterruptibly()
waits for completion; in case of failure rethrows the original exception without a new wrapping exception
so may cause problems for reporting stack traces
|
boolean |
trySuccess() |
io.netty.channel.ChannelPromise |
unvoid() |
static AsyncChannelPromise |
withListener(io.netty.channel.Channel channel,
io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener) |
static AsyncChannelPromise |
withListener(io.netty.channel.ChannelHandlerContext context,
io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener) |
static io.netty.channel.ChannelFuture |
writeAndFlush(io.netty.channel.ChannelHandlerContext context,
java.lang.Object message) |
static io.netty.channel.ChannelFuture |
writeAndFlush(io.netty.channel.ChannelHandlerContext context,
java.lang.Object message,
io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener) |
static io.netty.channel.ChannelFuture |
writeAndFlush(io.netty.channel.Channel channel,
java.lang.Object message) |
static io.netty.channel.ChannelFuture |
writeAndFlush(io.netty.channel.Channel channel,
java.lang.Object message,
io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener) |
await, await, awaitUninterruptibly, awaitUninterruptibly, cancel, cause, get, get, getNow, isCancellable, isCancelled, isDone, isSuccess, setUncancellable, toString, tryFailure, trySuccess, uncancellable, uncancellable
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
setUncancellable, tryFailure, trySuccess
public static AsyncChannelPromise withListener(io.netty.channel.ChannelHandlerContext context, io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener)
public static AsyncChannelPromise withListener(io.netty.channel.Channel channel, io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener)
public static io.netty.channel.ChannelFuture writeAndFlush(io.netty.channel.ChannelHandlerContext context, java.lang.Object message, io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener)
public static io.netty.channel.ChannelFuture writeAndFlush(io.netty.channel.Channel channel, java.lang.Object message, io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener)
public static io.netty.channel.ChannelFuture writeAndFlush(io.netty.channel.ChannelHandlerContext context, java.lang.Object message)
public static io.netty.channel.ChannelFuture writeAndFlush(io.netty.channel.Channel channel, java.lang.Object message)
public io.netty.channel.Channel channel()
channel
in interface io.netty.channel.ChannelFuture
channel
in interface io.netty.channel.ChannelPromise
public boolean isVoid()
isVoid
in interface io.netty.channel.ChannelFuture
public io.netty.channel.ChannelPromise setSuccess()
setSuccess
in interface io.netty.channel.ChannelPromise
public io.netty.channel.ChannelPromise setSuccess(java.lang.Void v)
setSuccess
in interface io.netty.channel.ChannelPromise
setSuccess
in interface io.netty.util.concurrent.Promise<java.lang.Void>
setSuccess
in class AsyncPromise<java.lang.Void>
public boolean trySuccess()
trySuccess
in interface io.netty.channel.ChannelPromise
public io.netty.channel.ChannelPromise setFailure(java.lang.Throwable throwable)
setFailure
in interface io.netty.channel.ChannelPromise
setFailure
in interface io.netty.util.concurrent.Promise<java.lang.Void>
setFailure
in class AsyncPromise<java.lang.Void>
public io.netty.channel.ChannelPromise sync() throws java.lang.InterruptedException
AsyncPromise
sync
in interface io.netty.channel.ChannelFuture
sync
in interface io.netty.channel.ChannelPromise
sync
in interface io.netty.util.concurrent.Promise<java.lang.Void>
sync
in class AsyncPromise<java.lang.Void>
java.lang.InterruptedException
public io.netty.channel.ChannelPromise syncUninterruptibly()
AsyncPromise
syncUninterruptibly
in interface io.netty.channel.ChannelFuture
syncUninterruptibly
in interface io.netty.channel.ChannelPromise
syncUninterruptibly
in interface io.netty.util.concurrent.Promise<java.lang.Void>
syncUninterruptibly
in class AsyncPromise<java.lang.Void>
public io.netty.channel.ChannelPromise await() throws java.lang.InterruptedException
await
in interface io.netty.channel.ChannelFuture
await
in interface io.netty.channel.ChannelPromise
await
in interface io.netty.util.concurrent.Promise<java.lang.Void>
await
in class AsyncPromise<java.lang.Void>
java.lang.InterruptedException
public io.netty.channel.ChannelPromise awaitUninterruptibly()
awaitUninterruptibly
in interface io.netty.channel.ChannelFuture
awaitUninterruptibly
in interface io.netty.channel.ChannelPromise
awaitUninterruptibly
in interface io.netty.util.concurrent.Promise<java.lang.Void>
awaitUninterruptibly
in class AsyncPromise<java.lang.Void>
public io.netty.channel.ChannelPromise addListener(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener)
addListener
in interface io.netty.channel.ChannelFuture
addListener
in interface io.netty.channel.ChannelPromise
addListener
in interface io.netty.util.concurrent.Promise<java.lang.Void>
addListener
in class AsyncPromise<java.lang.Void>
public io.netty.channel.ChannelPromise addListeners(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>>... listeners)
addListeners
in interface io.netty.channel.ChannelFuture
addListeners
in interface io.netty.channel.ChannelPromise
addListeners
in interface io.netty.util.concurrent.Promise<java.lang.Void>
addListeners
in class AsyncPromise<java.lang.Void>
public io.netty.channel.ChannelPromise removeListener(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>> listener)
removeListener
in interface io.netty.channel.ChannelFuture
removeListener
in interface io.netty.channel.ChannelPromise
removeListener
in interface io.netty.util.concurrent.Promise<java.lang.Void>
removeListener
in class AsyncPromise<java.lang.Void>
public io.netty.channel.ChannelPromise removeListeners(io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super java.lang.Void>>... listeners)
removeListeners
in interface io.netty.channel.ChannelFuture
removeListeners
in interface io.netty.channel.ChannelPromise
removeListeners
in interface io.netty.util.concurrent.Promise<java.lang.Void>
removeListeners
in class AsyncPromise<java.lang.Void>
public io.netty.channel.ChannelPromise unvoid()
unvoid
in interface io.netty.channel.ChannelPromise
Copyright © 2009-2022 The Apache Software Foundation