public class ConnectionEvent extends EventObject
This class is used for the following types of notifications:
Modifier and Type | Field and Description |
---|---|
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
|
source
Constructor and Description |
---|
ConnectionEvent(ManagedConnection source,
int eid)
Create a new ConnectionEvent
|
ConnectionEvent(ManagedConnection source,
int eid,
Exception exception)
Create a new ConnectionEvent
|
Modifier and Type | Method and Description |
---|---|
Object |
getConnectionHandle()
Get the ConnectionHandle
|
Exception |
getException()
Get the exception
|
int |
getId()
Get the event type
|
void |
setConnectionHandle(Object connectionHandle)
Set the ConnectionHandle
|
getSource, toString
public static final int CONNECTION_CLOSED
public static final int LOCAL_TRANSACTION_STARTED
public static final int LOCAL_TRANSACTION_COMMITTED
public static final int LOCAL_TRANSACTION_ROLLEDBACK
public static final int CONNECTION_ERROR_OCCURRED
protected int id
public ConnectionEvent(ManagedConnection source, int eid)
source
- the source of the eventeid
- the event idpublic ConnectionEvent(ManagedConnection source, int eid, Exception exception)
source
- the source of the eventeid
- the event idexception
- the exception associated with the eventpublic int getId()
public Exception getException()
public void setConnectionHandle(Object connectionHandle)
connectionHandle
- the connection handlepublic Object getConnectionHandle()
Copyright © 2012 JBoss, a division of Red Hat, Inc.. All Rights Reserved.