Package org.forgerock.opendj.ldap
Interface ConnectionEventListener
-
- All Superinterfaces:
EventListener
public interface ConnectionEventListener extends EventListener
An object that registers to be notified when a connection is closed by the application, receives an unsolicited notification, or experiences a fatal error.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
handleConnectionClosed()
Notifies this connection event listener that the application has calledclose
on the connection.void
handleConnectionError(boolean isDisconnectNotification, LdapException error)
Notifies this connection event listener that a fatal error has occurred and the connection can no longer be used - the server has crashed, for example.void
handleUnsolicitedNotification(ExtendedResult notification)
Notifies this connection event listener that the connection has just received the provided unsolicited notification from the server.
-
-
-
Method Detail
-
handleConnectionClosed
void handleConnectionClosed()
Notifies this connection event listener that the application has calledclose
on the connection. The connection event listener will be notified immediately after the application calls theclose
method on the associated connection.
-
handleConnectionError
void handleConnectionError(boolean isDisconnectNotification, LdapException error)
Notifies this connection event listener that a fatal error has occurred and the connection can no longer be used - the server has crashed, for example. The connection implementation makes this notification just before it throws the providedLdapException
to the application.Note: disconnect notifications are treated as fatal connection errors and are handled by this method. In this case
isDisconnectNotification
will betrue
anderror
will contain the result code and any diagnostic information contained in the notification message.- Parameters:
isDisconnectNotification
-true
if the error was triggered by a disconnect notification sent by the server, otherwisefalse
.error
- The exception that is about to be thrown to the application.
-
handleUnsolicitedNotification
void handleUnsolicitedNotification(ExtendedResult notification)
Notifies this connection event listener that the connection has just received the provided unsolicited notification from the server.Note: disconnect notifications are treated as fatal connection errors and are handled by the
handleConnectionError(boolean, org.forgerock.opendj.ldap.LdapException)
method.- Parameters:
notification
- The unsolicited notification.
-
-