站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 j2ee API Documentation 英文版文档

ConnectionEvent (JBoss J2EE API) - JBoss 4.0.1 sp1 j2ee API Documentation 英文版文档


javax.resource.spi
Class ConnectionEvent

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

public class ConnectionEvent
extends 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:

Version:
$Revision: 1.6 $
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 source, int eid)
          Create a new ConnectionEvent
ConnectionEvent(ManagedConnection source, int eid, Exception exception)
          Create a new ConnectionEvent
 
Method Summary
 Object getConnectionHandle()
          Get the ConnectionHandle
 Exception getException()
          Get the exception
 int getId()
          Get the event type
 void setConnectionHandle(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

LOCAL_TRANSACTION_STARTED

public static final int LOCAL_TRANSACTION_STARTED
Local transaction has been started

See Also:
Constant Field Values

LOCAL_TRANSACTION_COMMITTED

public static final int LOCAL_TRANSACTION_COMMITTED
Local transaction has been committed

See Also:
Constant Field Values

LOCAL_TRANSACTION_ROLLEDBACK

public static final int LOCAL_TRANSACTION_ROLLEDBACK
Local transaction has been rolled back

See Also:
Constant Field Values

CONNECTION_ERROR_OCCURRED

public static final int CONNECTION_ERROR_OCCURRED
Connection error has occurred

See Also:
Constant Field Values

id

protected int id
Type of event

Constructor Detail

ConnectionEvent

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

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

ConnectionEvent

public ConnectionEvent(ManagedConnection source,
                       int eid,
                       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 Exception getException()
Get the exception

Returns:
the exception

setConnectionHandle

public void setConnectionHandle(Object connectionHandle)
Set the ConnectionHandle

Parameters:
connectionHandle - the connection handle

getConnectionHandle

public Object getConnectionHandle()
Get the ConnectionHandle

Returns:
the connection handle


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.