Class ExceptionHandler
java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelDuplexHandler
org.drasyl.peer.connection.handler.ExceptionHandler
- All Implemented Interfaces:
 io.netty.channel.ChannelHandler,io.netty.channel.ChannelInboundHandler,io.netty.channel.ChannelOutboundHandler
public class ExceptionHandler
extends io.netty.channel.ChannelDuplexHandler
This handler listens to exceptions on the pipeline and sends them as 
ErrorMessage to the
 peer.- 
Nested Class Summary
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
io.netty.channel.ChannelHandler.Sharable - 
Field Summary
Fields - 
Constructor Summary
ConstructorsConstructorDescriptionExceptionHandler(Identity identity) Exception handler that does not re-throw occurredExceptions onexceptionCaught(io.netty.channel.ChannelHandlerContext, java.lang.Throwable)to the next pipeline.ExceptionHandler(Identity identity, boolean rethrowExceptions) Exception handler that does re-throw occurredExceptions onexceptionCaught(io.netty.channel.ChannelHandlerContext, java.lang.Throwable)to the next pipeline, ifrethrowExceptionsistrue. - 
Method Summary
Modifier and TypeMethodDescriptionvoidexceptionCaught(io.netty.channel.ChannelHandlerContext ctx, Throwable cause) Methods inherited from class io.netty.channel.ChannelDuplexHandler
bind, close, connect, deregister, disconnect, flush, read, writeMethods inherited from class io.netty.channel.ChannelInboundHandlerAdapter
channelActive, channelInactive, channelRead, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, userEventTriggeredMethods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, handlerAdded, handlerRemoved, isSharableMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.netty.channel.ChannelHandler
handlerAdded, handlerRemoved 
- 
Field Details
- 
EXCEPTION_HANDLER
- See Also:
 
 
 - 
 - 
Constructor Details
- 
ExceptionHandler
Exception handler that does not re-throw occurredExceptions onexceptionCaught(io.netty.channel.ChannelHandlerContext, java.lang.Throwable)to the next pipeline.- Parameters:
 identity- node's identity
 - 
ExceptionHandler
Exception handler that does re-throw occurredExceptions onexceptionCaught(io.netty.channel.ChannelHandlerContext, java.lang.Throwable)to the next pipeline, ifrethrowExceptionsistrue.- Parameters:
 identity- node's identityrethrowExceptions- iftruere-throws to next channel in the pipeline
 
 - 
 - 
Method Details
- 
exceptionCaught
- Specified by:
 exceptionCaughtin interfaceio.netty.channel.ChannelHandler- Specified by:
 exceptionCaughtin interfaceio.netty.channel.ChannelInboundHandler- Overrides:
 exceptionCaughtin classio.netty.channel.ChannelInboundHandlerAdapter
 
 -