Interface Session.ErrorHandler
- All Known Implementing Classes:
Session.ErrorHandler.Default
- Enclosing interface:
- Session
public static interface Session.ErrorHandler
The error notification interface for a session.
Session errors indicate that an unexpected condition has occurred. They have a similar purpose to Java exceptions, except they are delivered asynchronously. Session errors are used sparingly. Error conditions that occur in the context of an API operation and that an application can reasonably handle are reported to operation-specific callbacks, not as session errors.
An application can typically do nothing about a session error other than to report it for diagnosis. The server log should be examined for further information. Errors may be a consequence of a failed client operation, so it is usually appropriate for the application to close the session on receiving an error.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic class
DefaultSession.ErrorHandler
implementation which simply logs errors at error level. -
Method Summary
Modifier and TypeMethodDescriptionvoid
onError
(Session session, Session.SessionError error) Called when an error has occurred.
-
Method Details
-
onError
Called when an error has occurred.- Parameters:
session
- the sessionerror
- the error detail
-