java.lang.Object
org.firebirdsql.jaybird.xca.XcaConnectionEvent
The
XcaConnectionEvent class provides information about the source of a connection related event. A
XcaConnectionEvent instance contains the following information:
- Type of the connection event
FBManagedConnectioninstance that generated the connection event. AFBManagedConnectioninstance is returned from the methodgetSource()- Connection handle associated with the
FBManagedConnectioninstance; required for theCONNECTION_CLOSEDevent and optional for the other event types - Optionally, an exception indicating the connection related error. Note that exception is used for
CONNECTION_ERROR_OCCURRED
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionXcaConnectionEvent(FBManagedConnection source, XcaConnectionEvent.EventType eventType) Construct aConnectionEventobject.XcaConnectionEvent(FBManagedConnection source, XcaConnectionEvent.EventType eventType, Exception exception) Construct aConnectionEventobject. -
Method Summary
Modifier and TypeMethodDescriptionGet the connection handle associated with the managed connection instance.Get the exception associated with this event.voidsetConnectionHandle(FirebirdConnection connectionHandle)
-
Constructor Details
-
XcaConnectionEvent
Construct aConnectionEventobject.- Parameters:
source- the source of the eventeventType- Type of event
-
XcaConnectionEvent
public XcaConnectionEvent(FBManagedConnection source, XcaConnectionEvent.EventType eventType, Exception exception) Construct aConnectionEventobject.- Parameters:
source- the source of the eventeventType- Type of eventexception- Exception associated with the event
-
-
Method Details
-
getSource
- Returns:
- The managed connection on which the event initially occurred.
-
getConnectionHandle
Get the connection handle associated with the managed connection instance. Used forCONNECTION_CLOSEDevent.- Returns:
- The connection handle, can be
null
-
setConnectionHandle
-
getException
Get the exception associated with this event.- Returns:
- Exception for this event, can be
nullfor event type other thanCONNECTION_ERROR_OCCURRED
-
getEventType
- Returns:
- The type of event
-