Package org.firebirdsql.jaybird.xca
Class XcaConnectionEvent
- java.lang.Object
- 
- org.firebirdsql.jaybird.xca.XcaConnectionEvent
 
- 
 public final class XcaConnectionEvent extends java.lang.ObjectTheXcaConnectionEventclass provides information about the source of a connection related event. AXcaConnectionEventinstance contains the following information:- Type of the connection event
- FBManagedConnectioninstance that generated the connection event. A- FBManagedConnectioninstance is returned from the method- getSource()
- 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 SummaryNested Classes Modifier and Type Class Description static classXcaConnectionEvent.EventType
 - 
Constructor SummaryConstructors Constructor Description XcaConnectionEvent(FBManagedConnection source, XcaConnectionEvent.EventType eventType)Construct aConnectionEventobject.XcaConnectionEvent(FBManagedConnection source, XcaConnectionEvent.EventType eventType, java.lang.Exception exception)Construct aConnectionEventobject.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description FirebirdConnectiongetConnectionHandle()Get the connection handle associated with the managed connection instance.XcaConnectionEvent.EventTypegetEventType()java.lang.ExceptiongetException()Get the exception associated with this event.FBManagedConnectiongetSource()voidsetConnectionHandle(FirebirdConnection connectionHandle)
 
- 
- 
- 
Constructor Detail- 
XcaConnectionEventpublic XcaConnectionEvent(FBManagedConnection source, XcaConnectionEvent.EventType eventType) Construct aConnectionEventobject.- Parameters:
- source- the source of the event
- eventType- Type of event
 
 - 
XcaConnectionEventpublic XcaConnectionEvent(FBManagedConnection source, XcaConnectionEvent.EventType eventType, java.lang.Exception exception) Construct aConnectionEventobject.- Parameters:
- source- the source of the event
- eventType- Type of event
- exception- Exception associated with the event
 
 
- 
 - 
Method Detail- 
getSourcepublic FBManagedConnection getSource() - Returns:
- The managed connection on which the event initially occurred.
 
 - 
getConnectionHandlepublic FirebirdConnection getConnectionHandle() Get the connection handle associated with the managed connection instance. Used forCONNECTION_CLOSEDevent.- Returns:
- The connection handle, can be null
 
 - 
setConnectionHandlepublic void setConnectionHandle(FirebirdConnection connectionHandle) 
 - 
getExceptionpublic java.lang.Exception getException() Get the exception associated with this event.- Returns:
- Exception for this event, can be nullfor event type other thanCONNECTION_ERROR_OCCURRED
 
 - 
getEventTypepublic XcaConnectionEvent.EventType getEventType() - Returns:
- The type of event
 
 
- 
 
-