| | |
| | | * |
| | | * |
| | | * Copyright 2006-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2011-2013 ForgeRock AS |
| | | * Portions Copyright 2011-2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.protocols.jmx; |
| | | |
| | |
| | | { |
| | | JMXConnectionNotification jcn ; |
| | | |
| | | // |
| | | // We don't have the expected notification |
| | | if ( ! (notif instanceof JMXConnectionNotification)) |
| | | { |
| | |
| | | jcn = (JMXConnectionNotification) notif ; |
| | | } |
| | | |
| | | // |
| | | // The only handled notifications are CLOSED and FAILED |
| | | if ((!jcn.getType().equals(JMXConnectionNotification.CLOSED)) |
| | | && (!jcn.getType().equals(JMXConnectionNotification.FAILED))) |
| | |
| | | return; |
| | | } |
| | | |
| | | // |
| | | // Check if the closed connection corresponds to the current connection |
| | | if (!(jcn.getConnectionId().equals(jmxConnectionID))) |
| | | { |
| | | return; |
| | | } |
| | | |
| | | // |
| | | // Ok, we can perform the unbind: call finalize |
| | | disconnect(DisconnectReason.CLIENT_DISCONNECT, false, null); |
| | | } |
| | |
| | | return; |
| | | } |
| | | disconnectStarted = true ; |
| | | jmxConnectionHandler.unregisterClientConnection(this); |
| | | finalizeConnectionInternal(); |
| | | |
| | | |
| | | |
| | | // unbind the underlying connection |
| | | try |
| | | { |