List of usage examples for io.netty.channel ChannelHandlerContext flush
@Override ChannelHandlerContext flush();
From source file:com.cdg.study.netty.echo.EchoServerHandler.java
License:Open Source License
@Override public void channelReadComplete(ChannelHandlerContext context) { context.flush(); }
From source file:com.chiorichan.http.HttpHandler.java
License:Mozilla Public License
@Override public void flush(ChannelHandlerContext ctx) throws Exception { log.flushAndClose(); ctx.flush(); }
From source file:com.chiorichan.net.query.QueryServerHandler.java
License:Mozilla Public License
@Override public void channelActive(ChannelHandlerContext ctx) throws Exception { context = ctx;/*w w w .j ava2 s . co m*/ persistence = new NetworkPersistence(this); console = InteractiveConsole.createInstance(this, persistence); console.displayWelcomeMessage(); QueryEvent queryEvent = new QueryEvent(ctx, QueryType.CONNECTED, null); try { Loader.getEventBus().callEventWithException(queryEvent); } catch (EventException ex) { throw new IOException( "Exception encountered during query event call, most likely the fault of a plugin.", ex); } if (queryEvent.isCancelled()) { ChannelFuture future = ctx.write(parseColor((queryEvent.getReason().isEmpty()) ? "We're sorry, you've been disconnected from the server by a Cancelled Event." : queryEvent.getReason())); future.addListener(ChannelFutureListener.CLOSE); ctx.flush(); return; } console.resetPrompt(); }
From source file:com.chschmid.huemorse.server.handler.MorseServerHandler.java
License:Open Source License
public void channelReadComplete(ChannelHandlerContext ctx) throws Exception { ctx.flush(); }
From source file:com.codebullets.external.party.simulator.connections.websocket.inbound.NettyWebSocketServerHandler.java
License:Apache License
@Override public void channelReadComplete(final ChannelHandlerContext ctx) { ctx.flush(); }
From source file:com.common.client.WrappedClientHandler.java
License:Apache License
@Override public void channelReadComplete(ChannelHandlerContext ctx) { // ???/*from w w w.jav a 2 s. c o m*/ ctx.flush(); ctx.close(); // System.gc(); }
From source file:com.common.server.ScheduleServerHandler.java
License:Apache License
@Override public void channelReadComplete(ChannelHandlerContext ctx) { ctx.flush(); System.out.println("channelReadComplete"); }
From source file:com.company.EchoClientHandler.java
License:Apache License
public void channelReadComplete(ChannelHandlerContext ctx) { ctx.flush(); }
From source file:com.corundumstudio.socketio.transport.WebSocketTransport.java
License:Apache License
@Override public void channelReadComplete(ChannelHandlerContext ctx) throws Exception { ClientHead client = clientsBox.get(ctx.channel()); if (client != null && client.isTransportChannel(ctx.channel(), Transport.WEBSOCKET)) { ctx.flush(); } else {//from ww w . j av a2s . co m super.channelReadComplete(ctx); } }
From source file:com.couchbase.client.core.endpoint.AbstractGenericHandler.java
License:Apache License
@Override public void channelWritabilityChanged(final ChannelHandlerContext ctx) throws Exception { if (!ctx.channel().isWritable()) { ctx.flush(); }//from www. j a v a 2 s . c om ctx.fireChannelWritabilityChanged(); }