javax.resource.spi
Class ConnectionEvent

java.lang.Object
  extended byjava.util.EventObject
      extended byjavax.resource.spi.ConnectionEvent
All Implemented Interfaces:
java.io.Serializable

public class ConnectionEvent
extends java.util.EventObject

The ConnectionEvent class provides information about the source of a Connection related event. A ConnectionEvent contains:

This class is used for the following types of notifications:

See Also:
Serialized Form

Field Summary
static int CONNECTION_CLOSED
          Connection has been closed
static int CONNECTION_ERROR_OCCURRED
          Connection error has occurred
protected  int id
          Type of event
static int LOCAL_TRANSACTION_COMMITTED
          Local transaction has been committed
static int LOCAL_TRANSACTION_ROLLEDBACK
          Local transaction has been rolled back
static int LOCAL_TRANSACTION_STARTED
          Local transaction has been started
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
ConnectionEvent(ManagedConnection (src)  source, int eid)
          Create a new ConnectionEvent
ConnectionEvent(ManagedConnection (src)  source, int eid, java.lang.Exception exception)
          Create a new ConnectionEvent
 
Method Summary
 java.lang.Object getConnectionHandle()
          Get the ConnectionHandle
 java.lang.Exception getException()
          Get the exception
 int getId()
          Get the event type
 void setConnectionHandle(java.lang.Object connectionHandle)
          Set the ConnectionHandle
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONNECTION_CLOSED

public static final int CONNECTION_CLOSED
Connection has been closed

See Also:
Constant Field Values (src)

LOCAL_TRANSACTION_STARTED

public static final int LOCAL_TRANSACTION_STARTED
Local transaction has been started

See Also:
Constant Field Values (src)

LOCAL_TRANSACTION_COMMITTED

public static final int LOCAL_TRANSACTION_COMMITTED
Local transaction has been committed

See Also:
Constant Field Values (src)

LOCAL_TRANSACTION_ROLLEDBACK

public static final int LOCAL_TRANSACTION_ROLLEDBACK
Local transaction has been rolled back

See Also:
Constant Field Values (src)

CONNECTION_ERROR_OCCURRED

public static final int CONNECTION_ERROR_OCCURRED
Connection error has occurred

See Also:
Constant Field Values (src)

id

protected int id
Type of event

Constructor Detail

ConnectionEvent

public ConnectionEvent(ManagedConnection (src)  source,
                       int eid)
Create a new ConnectionEvent

Parameters:
source - the source of the event
eid - the event id

ConnectionEvent

public ConnectionEvent(ManagedConnection (src)  source,
                       int eid,
                       java.lang.Exception exception)
Create a new ConnectionEvent

Parameters:
source - the source of the event
eid - the event id
exception - the exception associated with the event
Method Detail

getId

public int getId()
Get the event type

Returns:
the event id

getException

public java.lang.Exception getException()
Get the exception

Returns:
the exception

setConnectionHandle

public void setConnectionHandle(java.lang.Object connectionHandle)
Set the ConnectionHandle

Parameters:
connectionHandle - the connection handle

getConnectionHandle

public java.lang.Object getConnectionHandle()
Get the ConnectionHandle

Returns:
the connection handle