public interface ConnectionEventListener extends EventListener
Modifier and Type | Method and Description |
---|---|
void |
handleConnectionClosed()
Notifies this connection event listener that the application has called
close 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.
|
void handleConnectionClosed()
close
on the connection. The connection event listener will be
notified immediately after the application calls the close
method
on the associated connection.void handleConnectionError(boolean isDisconnectNotification, LdapException error)
LdapException
to the
application.
Note: disconnect notifications are treated as fatal connection
errors and are handled by this method. In this case
isDisconnectNotification
will be true
and error
will contain the result code and any diagnostic information contained in
the notification message.
isDisconnectNotification
- true
if the error was triggered by a disconnect
notification sent by the server, otherwise false
.error
- The exception that is about to be thrown to the application.void handleUnsolicitedNotification(ExtendedResult notification)
Note: disconnect notifications are treated as fatal connection
errors and are handled by the handleConnectionError(boolean, org.forgerock.opendj.ldap.LdapException)
method.
notification
- The unsolicited notification.Copyright 2011-2017 ForgeRock AS.