@Override public void channelInactive(ChannelHandlerContext ctx) { // Only handle cleanup connection is even known if (this.connection != null) { // Alert the connection object that the channel has been disconnected this.connection.disconnected(); // Punt the cleanup to the Switch Manager notifyConnectionClosed(this.connection); } log.info("[{}] Disconnected connection", getConnectionInfoString()); }
@Override @LogMessageDoc( message = "Disconnected switch {switch information}", explanation = "The specified switch has disconnected.") public void channelDisconnected(ChannelHandlerContext ctx, ChannelStateEvent e) throws Exception { // Only handle cleanup connection is even known if (this.connection != null) { // Alert the connection object that the channel has been disconnected this.connection.disconnected(); // Punt the cleanup to the Switch Manager notifyConnectionClosed(this.connection); } log.info("[{}] Disconnected connection", getConnectionInfoString()); }