public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception {
List<DisconnectHandler> connectHandlers = chain.getHandlers(DisconnectHandler.class);
ProtocolSession session = (ProtocolSession) attributes.get(ctx.getChannel());
if (connectHandlers != null) {
for (int i = 0; i < connectHandlers.size(); i++) {
DisconnectHandler cHandler = connectHandlers.get(i);
connectHandlers.get(i).onDisconnect(session);
}
}