Java Code Examples for io.netty.channel.ChannelHandlerContext#fireChannelWritabilityChanged()
The following examples show how to use
io.netty.channel.ChannelHandlerContext#fireChannelWritabilityChanged() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractGenericHandler.java From couchbase-jvm-core with Apache License 2.0 | 5 votes |
@Override public void channelWritabilityChanged(final ChannelHandlerContext ctx) throws Exception { if (!ctx.channel().isWritable()) { ctx.flush(); } ctx.fireChannelWritabilityChanged(); }
Example 2
Source File: ChunkedWriteHandler.java From netty-4.1.22 with Apache License 2.0 | 5 votes |
@Override public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception { if (ctx.channel().isWritable()) { // channel is writable again try to continue flushing通道再次写入,请尝试继续刷新 doFlush(ctx); } ctx.fireChannelWritabilityChanged(); }
Example 3
Source File: LoggingHandler.java From netty-4.1.22 with Apache License 2.0 | 5 votes |
@Override public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception { if (logger.isEnabled(internalLevel)) { logger.log(internalLevel, format(ctx, "WRITABILITY CHANGED")); } ctx.fireChannelWritabilityChanged(); }
Example 4
Source File: FlushConsolidationHandler.java From netty-4.1.22 with Apache License 2.0 | 5 votes |
@Override public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception { if (!ctx.channel().isWritable()) { // The writability of the channel changed to false, so flush all consolidated flushes now to free up memory. flushIfNeeded(ctx); } ctx.fireChannelWritabilityChanged(); }
Example 5
Source File: HttpStreamsHandler.java From aws-sdk-java-v2 with Apache License 2.0 | 5 votes |
private void flushNext(ChannelHandlerContext ctx) { if (!outgoing.isEmpty()) { unbufferedWrite(ctx, outgoing.element()); } else { ctx.fireChannelWritabilityChanged(); } }
Example 6
Source File: ChunkedWriteHandler.java From netty4.0.27Learn with Apache License 2.0 | 5 votes |
@Override public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception { if (ctx.channel().isWritable()) { // channel is writable again try to continue flushing doFlush(ctx); } ctx.fireChannelWritabilityChanged(); }
Example 7
Source File: HandlerSubscriber.java From aws-sdk-java-v2 with Apache License 2.0 | 4 votes |
@Override public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception { maybeRequestMore(); ctx.fireChannelWritabilityChanged(); }
Example 8
Source File: EndpointedChannelHandler.java From riiablo with Apache License 2.0 | 4 votes |
@Override public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception { if (DEBUG_CALLS) Gdx.app.debug(TAG, "channelWritabilityChanged"); ctx.fireChannelWritabilityChanged(); }
Example 9
Source File: ReliableChannelHandler.java From riiablo with Apache License 2.0 | 4 votes |
@Override public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception { Gdx.app.debug(TAG, "channelWritabilityChanged"); ctx.fireChannelWritabilityChanged(); }
Example 10
Source File: EndpointedChannelHandler.java From riiablo with Apache License 2.0 | 4 votes |
@Override public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception { if (DEBUG_CALLS) Gdx.app.debug(TAG, "channelWritabilityChanged"); ctx.fireChannelWritabilityChanged(); }
Example 11
Source File: ReliableChannelHandler.java From riiablo with Apache License 2.0 | 4 votes |
@Override public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception { Gdx.app.debug(TAG, "channelWritabilityChanged"); ctx.fireChannelWritabilityChanged(); }
Example 12
Source File: HandlerSubscriber.java From netty-reactive-streams with Apache License 2.0 | 4 votes |
@Override public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception { maybeRequestMore(); ctx.fireChannelWritabilityChanged(); }
Example 13
Source File: ExceptionHandlerFilter.java From spring-boot-netty with MIT License | 4 votes |
@Override public void channelWritabilityChanged(final ChannelHandlerContext ctx) throws Exception { ctx.fireChannelWritabilityChanged(); }
Example 14
Source File: RemoteConnection.java From dremio-oss with Apache License 2.0 | 4 votes |
@Override public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception { writeManager.setWritable(ctx.channel().isWritable()); ctx.fireChannelWritabilityChanged(); }
Example 15
Source File: ExceptionChannelHandler.java From journalkeeper with Apache License 2.0 | 4 votes |
public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception { ctx.fireChannelWritabilityChanged(); }
Example 16
Source File: NettyChannelHandlerAdapter.java From Ak47 with Apache License 2.0 | 4 votes |
@Override public void channelWritabilityChanged(ChannelHandlerContext nettyctx) throws Exception { nettyctx.fireChannelWritabilityChanged(); }
Example 17
Source File: Netty4ChannelHandlerAdapter.java From Ak47 with Apache License 2.0 | 4 votes |
@Override public void channelWritabilityChanged(ChannelHandlerContext nettyctx) throws Exception { nettyctx.fireChannelWritabilityChanged(); }
Example 18
Source File: MqttCommandInvocation.java From joyqueue with Apache License 2.0 | 4 votes |
@Override public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception { String clientId = NettyAttrManager.getAttrClientId(ctx.channel()); LOG.info("Channel Writable Changed, clientID: {}", clientId); ctx.fireChannelWritabilityChanged(); }
Example 19
Source File: AbstractRemoteConnection.java From Bats with Apache License 2.0 | 4 votes |
@Override public void channelWritabilityChanged(ChannelHandlerContext ctx) throws Exception { writeManager.setWritable(ctx.channel().isWritable()); ctx.fireChannelWritabilityChanged(); }
Example 20
Source File: RntbdRequestManager.java From azure-cosmosdb-java with MIT License | 2 votes |
/** * Gets called once the writable state of a {@link Channel} changed. You can check the state with * {@link Channel#isWritable()}. * * @param context {@link ChannelHandlerContext} to which this {@link RntbdRequestManager} belongs */ @Override public void channelWritabilityChanged(final ChannelHandlerContext context) { this.traceOperation(context, "channelWritabilityChanged"); context.fireChannelWritabilityChanged(); }