List of usage examples for io.netty.channel ChannelHandlerContext fireExceptionCaught
@Override ChannelHandlerContext fireExceptionCaught(Throwable cause);
From source file:org.obsidianbox.obsidian.message.CommonMessagePipeline.java
License:MIT License
@Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { game.getLogger().fatal("Exception caught in pipeline!", cause); ctx.fireExceptionCaught(cause); }
From source file:org.onosproject.openflow.controller.impl.HandshakeTimeoutHandler.java
License:Apache License
void checkTimeout(ChannelHandlerContext ctx) { if (channelHandler.isHandshakeComplete()) { // handshake complete, Handshake monitoring timeout no-longer needed ctx.channel().pipeline().remove(this); return;//w ww.ja va 2s . c o m } if (!ctx.channel().isActive()) { return; } if (System.currentTimeMillis() > deadline) { log.info("Handshake time out {}", channelHandler); ctx.fireExceptionCaught(new HandshakeTimeoutException()); } }
From source file:org.onosproject.xmpp.core.ctl.handlers.XmppDecoder.java
License:Apache License
@Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { logger.info("Exception caught: {}", cause.getMessage()); if (cause.getCause() instanceof XmppValidationException) { if (((XmppValidationException) cause.getCause()).isStreamValidationException()) { XmppStreamError.Condition condition = XmppStreamError.Condition.bad_format; XmppStreamError error = new XmppStreamError(condition); ctx.channel().writeAndFlush(error); ctx.channel().writeAndFlush(new XmppStreamClose()); return; }//from w ww . j av a 2s . co m } logger.info("Not a StreamValidationException. Sending exception upstream."); ctx.fireExceptionCaught(cause); }
From source file:org.opendaylight.controller.netconf.nettyutil.handler.ssh.virtualsocket.ChannelInputStream.java
License:Open Source License
public void exceptionCaught(ChannelHandlerContext ctx, Throwable throwable) { ctx.fireExceptionCaught(throwable); }
From source file:org.opendaylight.controller.netconf.nettyutil.handler.ssh.virtualsocket.VirtualSocket.java
License:Open Source License
public void exceptionCaught(ChannelHandlerContext ctx, Throwable throwable) { // TODO exceptionCaught is deprecated transform this handler ctx.fireExceptionCaught(throwable); }
From source file:org.opendaylight.controller.netconf.util.handler.ssh.virtualsocket.ChannelInputStream.java
License:Open Source License
public void exceptionCaught(ChannelHandlerContext ctx, Throwable throwable) throws Exception { ctx.fireExceptionCaught(throwable); }
From source file:org.opendaylight.groupbasedpolicy.jsonrpc.JsonRpcDecoder.java
License:Open Source License
private void fail(ChannelHandlerContext ctx, long frameLength) { if (frameLength > 0) { ctx.fireExceptionCaught(new TooLongFrameException( "frame length exceeds " + maxFrameLength + ": " + frameLength + " - discarded")); } else {/* w ww. j av a 2 s. c o m*/ ctx.fireExceptionCaught( new TooLongFrameException("frame length exceeds " + maxFrameLength + " - discarding")); } }
From source file:org.thingsplode.synapse.proxy.handlers.WSMessageDecoder.java
License:Apache License
@Override public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) { if (!handshakeFuture.isDone()) { handshakeFuture.setFailure(cause); }//ww w . j a v a 2 s .co m logger.error("Unhandled exception caught at " + this.getClass().getSimpleName() + " with message: " + cause.getMessage(), cause); //ctx.close(); ctx.fireExceptionCaught(cause); }
From source file:org.tiger.netty.rpc.all.server.LoginAuthRespHandler.java
License:Apache License
public void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception { cause.printStackTrace();//from ww w. j av a 2 s . c o m nodeCheck.remove(ctx.channel().remoteAddress().toString());// ctx.close(); //?Handler ctx.fireExceptionCaught(cause); }
From source file:reactor.ipc.netty.http.server.HttpServerHandler.java
License:Open Source License
void doPipeline(ChannelHandlerContext ctx, Object msg) { if (pipelined == null) { pipelined = QueueSupplier.unbounded().get(); }/*from w w w .j a v a2s .co m*/ if (!pipelined.offer(msg)) { ctx.fireExceptionCaught(Exceptions.failWithOverflow()); } }