java.lang.Object | +--com.ibm.commerce.messaging.adapters.jcasample.SampleConnectionEventListener
****************************************************************************
It implements javax.resource.spi.ConnectionEventListener
interface. It keeps a vector of ConnectionEventListener registered with a
ManagedConnection. When its sendEvent(int, Exception, Object) is invoked, it
loops through the vector and sends the event to all registered
ConnectionEventListener.
Field Summary | |
---|---|
static java.lang.String |
COPYRIGHT Copyright statement. |
Constructor Summary | |
---|---|
SampleConnectionEventListener(ManagedConnection mc) Default constructor. |
Method Summary | |
---|---|
void |
addConnectionListener(ConnectionEventListener l) Adds a connection listener to the existing connection listener |
void |
connectionClosed(ConnectionEvent arg1) Connection closed. |
void |
connectionErrorOccurred(ConnectionEvent arg1) The connectionErrorOccurred method. |
void |
localTransactionCommitted(ConnectionEvent arg1) The localTransactionCommitted method. |
void |
localTransactionRolledback(ConnectionEvent arg1) The localTransactionRolledback method. |
void |
localTransactionStarted(ConnectionEvent arg1) The localTransactionStarted method. |
void |
removeConnectionListener(ConnectionEventListener l) Removes a connection listener |
void |
sendEvent(int eventType, java.lang.Exception ex,
java.lang.Object connectionHandle) Sends an event |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll,
toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String COPYRIGHT
Constructor Detail |
---|
public SampleConnectionEventListener(ManagedConnection mc)
Method Detail |
---|
public void connectionClosed(ConnectionEvent arg1)
arg1
- The connection eventpublic void connectionErrorOccurred(ConnectionEvent arg1)
connectionErrorOccurred
method. It does nothing in the
current implementation.
arg1
- The connection eventpublic void localTransactionCommitted(ConnectionEvent arg1)
localTransactionCommitted
method. It does nothing in
current implementation.
arg1
- The connection eventpublic void localTransactionRolledback(ConnectionEvent arg1)
localTransactionRolledback
method. It does nothing in
current implementation.
arg1
- The connection eventpublic void localTransactionStarted(ConnectionEvent arg1)
localTransactionStarted
method. It does nothing in current
implementation.
arg1
- The connection eventpublic void addConnectionListener(ConnectionEventListener l)
public void removeConnectionListener(ConnectionEventListener l)
public void sendEvent(int eventType, java.lang.Exception ex, java.lang.Object connectionHandle)
eventType
- The event typeex
- The ExceptionconnectionHandle
- The connection handle