List of usage examples for io.netty.channel ChannelPipeline fireChannelRead
@Override ChannelPipeline fireChannelRead(Object msg);
From source file:org.jfxvnc.net.rfb.codec.ProtocolHandshakeHandler.java
License:Apache License
@Override public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception { if (msg instanceof ProtocolVersion) { handleServerVersion(ctx, (ProtocolVersion) msg); return;/*from w w w. jav a 2 s .co m*/ } if (msg instanceof SecurityTypesEvent) { handleSecurityTypes(ctx, (SecurityTypesEvent) msg); return; } if (msg instanceof RfbSecurityMessage) { handleSecurityMessage(ctx, (RfbSecurityMessage) msg); return; } if (msg instanceof SecurityResultEvent) { handleSecurityResult(ctx, (SecurityResultEvent) msg); return; } if (msg instanceof ServerInitEvent) { handshaker.finishHandshake(ctx.channel(), config.versionProperty().get()); ChannelPipeline cp = ctx.pipeline(); cp.fireUserEventTriggered(ProtocolState.HANDSHAKE_COMPLETE); cp.remove(this); cp.fireChannelRead(msg); return; } throw new ProtocolException("unknown message occurred: " + msg); }