Mark ChannelHandler.exceptionCaught(...) as deprected.

Motivation:

exceptionCaught(...) will only handle inbound exceptions which means it makes not much sense to have it also on ChannelOutboundHandler. Because of this we should move it to ChannelInboundHandler.

Modifications:

Add @deprecated annotation to ChannelHandler.exceptionCaught(...).

Result:

Preapre to cleanup the API in later release.
This commit is contained in:
Norman Maurer 2015-11-11 10:32:03 -08:00
parent b6fcced64c
commit 41e03adf24
2 changed files with 4 additions and 0 deletions

View File

@ -192,7 +192,10 @@ public interface ChannelHandler {
/**
* Gets called if a {@link Throwable} was thrown.
*
* @deprecated is part of {@link ChannelInboundHandler}
*/
@Deprecated
void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception;
/**

View File

@ -70,5 +70,6 @@ public interface ChannelInboundHandler extends ChannelHandler {
* Gets called if a {@link Throwable} was thrown.
*/
@Override
@SuppressWarnings("deprecated")
void exceptionCaught(ChannelHandlerContext ctx, Throwable cause) throws Exception;
}