|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.jca.core.connectionmanager.listener.AbstractConnectionListener
public abstract class AbstractConnectionListener

Abstract implementation of the ConnectionListener interface
contract.
| Field Summary | |
|---|---|
protected boolean |
trace
Log trace |
| Constructor Summary | |
|---|---|
protected |
AbstractConnectionListener(ConnectionManager cm,
javax.resource.spi.ManagedConnection managedConnection,
Pool pool,
Object context,
org.jboss.jca.common.api.metadata.common.FlushStrategy flushStrategy)
Creates a new instance of the listener that is responsible for tracking the owned connection instance. |
| Method Summary | |
|---|---|
int |
compareTo(Object o)
Compare |
void |
connectionClosed(javax.resource.spi.ConnectionEvent event)
|
void |
connectionErrorOccurred(javax.resource.spi.ConnectionEvent event)
|
void |
delist()
Delist the managed connection |
void |
enlist()
Enlist the managed connection |
protected org.jboss.jca.core.api.connectionmanager.ccm.CachedConnectionManager |
getCachedConnectionManager()
Gets cached connection manager |
protected ConnectionManager |
getConnectionManager()
Gets connection manager. |
Object |
getContext()
Retrieve the context used by the pool. |
long |
getLastValidatedTime()
Retrieve the last time this connection was validated. |
protected abstract CoreLogger |
getLogger()
Get the logger |
javax.resource.spi.ManagedConnection |
getManagedConnection()
|
Pool |
getPool()
Retrieve the pool for this listener. |
ConnectionState |
getState()
Retrieve the state of this connection. |
void |
handleClosed(Object h)
|
void |
handleCreated(Object h)
|
boolean |
isManagedConnectionFree()
Is the managed connection free? |
boolean |
isTimedOut(long timeout)
Has the connection timed out? |
boolean |
isTrackByTx()
Get whether the listener is track by transaction |
void |
localTransactionCommitted(javax.resource.spi.ConnectionEvent event)
|
void |
localTransactionRolledback(javax.resource.spi.ConnectionEvent event)
|
void |
localTransactionStarted(javax.resource.spi.ConnectionEvent event)
|
void |
registerConnection(Object handle)
Register a new connection |
void |
setLastValidatedTime(long lastValidated)
Set the last time, in milliseconds, that this connection was validated. |
void |
setState(ConnectionState newState)
Set the state of this connection. |
void |
setTrackByTx(boolean trackByTx)
Set whether the listener is track by transaction |
void |
tidyup()
Tidyup |
String |
toString()
|
protected void |
toString(StringBuffer buffer)
Add specific properties. |
void |
unregisterConnection(Object handle)
Unregister a connection |
protected void |
unregisterConnections()
Unregister connections. |
void |
used()
Mark the connection as used |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected boolean trace
| Constructor Detail |
|---|
protected AbstractConnectionListener(ConnectionManager cm,
javax.resource.spi.ManagedConnection managedConnection,
Pool pool,
Object context,
org.jboss.jca.common.api.metadata.common.FlushStrategy flushStrategy)
cm - connection managermanagedConnection - managed connectionpool - poolcontext - pool internal contextflushStrategy - flushStrategy| Method Detail |
|---|
protected org.jboss.jca.core.api.connectionmanager.ccm.CachedConnectionManager getCachedConnectionManager()
protected ConnectionManager getConnectionManager()
protected abstract CoreLogger getLogger()
public void delist()
throws javax.resource.ResourceException
javax.resource.ResourceException - if exception occurs
public void enlist()
throws SystemException
SystemException - for errorspublic Object getContext()
public long getLastValidatedTime()
public javax.resource.spi.ManagedConnection getManagedConnection()
getManagedConnection in interface org.jboss.jca.core.api.connectionmanager.listener.ConnectionListenerpublic Pool getPool()
public ConnectionState getState()
public boolean isManagedConnectionFree()
public boolean isTimedOut(long timeout)
timeout - the timeout
public boolean isTrackByTx()
public void registerConnection(Object handle)
handle - the connection handlepublic void setLastValidatedTime(long lastValidated)
lastValidated - the last time the connection was validated in
milliseconds.public void setState(ConnectionState newState)
newState - new statepublic void setTrackByTx(boolean trackByTx)
trackByTx - true for track by transaction, false otherwise
public void tidyup()
throws javax.resource.ResourceException
Invoked just before returning the connection to the pool when the connection is not being destroyed.
javax.resource.ResourceException - for any errorpublic void unregisterConnection(Object handle)
handle - the connection handleprotected void unregisterConnections()
public void used()
public void connectionClosed(javax.resource.spi.ConnectionEvent event)
connectionClosed in interface javax.resource.spi.ConnectionEventListenerpublic void connectionErrorOccurred(javax.resource.spi.ConnectionEvent event)
connectionErrorOccurred in interface javax.resource.spi.ConnectionEventListenerpublic void localTransactionCommitted(javax.resource.spi.ConnectionEvent event)
localTransactionCommitted in interface javax.resource.spi.ConnectionEventListenerpublic void localTransactionRolledback(javax.resource.spi.ConnectionEvent event)
localTransactionRolledback in interface javax.resource.spi.ConnectionEventListenerpublic void localTransactionStarted(javax.resource.spi.ConnectionEvent event)
localTransactionStarted in interface javax.resource.spi.ConnectionEventListenerpublic void handleCreated(Object h)
handleCreated in interface org.jboss.jca.core.spi.transaction.ConnectableResourceListenerpublic void handleClosed(Object h)
handleClosed in interface org.jboss.jca.core.spi.transaction.ConnectableResourceListenerpublic int compareTo(Object o)
compareTo in interface Comparableo - The other object
public String toString()
toString in class Objectprotected void toString(StringBuffer buffer)
buffer - buffer instance
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||