/** * Writes one message to the inbound of this {@link Channel} and does not flush it. This * method is conceptually equivalent to {@link #write(Object)}. * * @see #writeOneOutbound(Object) */ public ChannelFuture writeOneInbound(Object msg) { return writeOneInbound(msg, newPromise()); }
/** * Writes one message to the outbound of this {@link Channel} and does not flush it. This * method is conceptually equivalent to {@link #write(Object)}. * * @see #writeOneInbound(Object) */ public ChannelFuture writeOneOutbound(Object msg) { return writeOneOutbound(msg, newPromise()); }
@Override public final ChannelFuture disconnect() { return disconnect(newPromise()); }
@Override public final ChannelFuture close() { return close(newPromise()); }
/** * Writes one message to the outbound of this {@link Channel} and does not flush it. This * method is conceptually equivalent to {@link #write(Object)}. * * @see #writeOneInbound(Object) */ public ChannelFuture writeOneOutbound(Object msg) { return writeOneOutbound(msg, newPromise()); }
@Override public final ChannelFuture close() { return close(newPromise()); }
@Override public final ChannelFuture disconnect() { return disconnect(newPromise()); }
/** * Writes one message to the inbound of this {@link Channel} and does not flush it. This * method is conceptually equivalent to {@link #write(Object)}. * * @see #writeOneOutbound(Object) */ public ChannelFuture writeOneInbound(Object msg) { return writeOneInbound(msg, newPromise()); }
@Override public final ChannelFuture close() { return close(newPromise()); }
/** * Writes one message to the inbound of this {@link Channel} and does not flush it. This * method is conceptually equivalent to {@link #write(Object)}. * * @see #writeOneOutbound(Object) */ public ChannelFuture writeOneInbound(Object msg) { return writeOneInbound(msg, newPromise()); }
/** * Writes one message to the outbound of this {@link Channel} and does not flush it. This * method is conceptually equivalent to {@link #write(Object)}. * * @see #writeOneInbound(Object) */ public ChannelFuture writeOneOutbound(Object msg) { return writeOneOutbound(msg, newPromise()); }
@Override public final ChannelFuture disconnect() { return disconnect(newPromise()); }
public void setEventLoopThread() { ChannelPromise deregisterPromise = channel.newPromise(); channel.deregister(deregisterPromise); channel.runPendingTasks(); assertThat("failed to deregister", deregisterPromise.isDone() && deregisterPromise.isSuccess()); ThreadAwareEmbeddedEventLoop loop = new ThreadAwareEmbeddedEventLoop(Thread.currentThread()); ChannelFuture registerPromise = loop.register(channel); assertThat("failed to register", registerPromise.isDone() && registerPromise.isSuccess()); }
protected void init(int defaultRequestN) { this.defaultRequestN = defaultRequestN; channel = new EmbeddedChannel(new LoggingHandler()); channelPromise = channel.newPromise(); ChannelHandlerContext ctx = channel.pipeline().firstContext(); subscriber = new WriteStreamSubscriber(ctx, channelPromise, defaultRequestN().intValue()); mockProducer = new MockProducer(); }
WriteStreamSubscriber newSubscriber() { return interceptor.newSubscriber(channel.pipeline().lastContext(), channel.newPromise()); }
/** * Writes one message to the outbound of this {@link Channel} and does not flush it. This * method is conceptually equivalent to {@link #write(Object)}. * * @see #writeOneInbound(Object) */ public ChannelFuture writeOneOutbound(Object msg) { return writeOneOutbound(msg, newPromise()); }
/** * Writes one message to the inbound of this {@link Channel} and does not flush it. This * method is conceptually equivalent to {@link #write(Object)}. * * @see #writeOneOutbound(Object) */ public ChannelFuture writeOneInbound(Object msg) { return writeOneInbound(msg, newPromise()); }
@Override public final ChannelFuture disconnect() { return disconnect(newPromise()); }
/** * Writes one message to the outbound of this {@link Channel} and does not flush it. This * method is conceptually equivalent to {@link #write(Object)}. * * @see #writeOneInbound(Object) */ public ChannelFuture writeOneOutbound(Object msg) { return writeOneOutbound(msg, newPromise()); }
/** * Writes one message to the inbound of this {@link Channel} and does not flush it. This * method is conceptually equivalent to {@link #write(Object)}. * * @see #writeOneOutbound(Object) */ public ChannelFuture writeOneInbound(Object msg) { return writeOneInbound(msg, newPromise()); }