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

BaseConnectionManager2.BaseConnectionEventListener (JBoss Connector API) - JBoss 3.2.7 connector API Documentation 英文版文档


org.jboss.resource.connectionmanager
Class BaseConnectionManager2.BaseConnectionEventListener

java.lang.Object
  extended byorg.jboss.resource.connectionmanager.BaseConnectionManager2.BaseConnectionEventListener
All Implemented Interfaces:
javax.resource.spi.ConnectionEventListener, ConnectionListener, EventListener
Direct Known Subclasses:
TxConnectionManager.TxConnectionEventListener
Enclosing class:
BaseConnectionManager2

protected abstract class BaseConnectionManager2.BaseConnectionEventListener
extends Object
implements ConnectionListener


Field Summary
protected  org.jboss.logging.Logger log
           
protected  boolean trace
           
 
Fields inherited from interface org.jboss.resource.connectionmanager.ConnectionListener
DESTROY, DESTROYED, NORMAL
 
Constructor Summary
protected BaseConnectionManager2.BaseConnectionEventListener(javax.resource.spi.ManagedConnection mc, ManagedConnectionPool mcp, Object context, org.jboss.logging.Logger log)
           
 
Method Summary
 void connectionErrorOccurred(javax.resource.spi.ConnectionEvent ce)
          May be overridden to e.g.
 void delist()
          Delist the managed connection
 void enlist()
          Enlist the managed connection
 Object getContext()
          Retrieve the context used by the pool
 javax.resource.spi.ManagedConnection getManagedConnection()
          Retrieve the managed connection for this listener
 ManagedConnectionPool getManagedConnectionPool()
          Retrieve the managed connection pool for this listener
 int getState()
          Retrieve the state of this connection
 void grantPermit(boolean value)
          Tell the connection listener whether it owns the permit.
 boolean hasPermit()
          Whether the connection has a permit
 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 registerConnection(Object handle)
          Register a new connection
 void setState(int newState)
          Set the state of this connection
 void setTrackByTx(boolean trackByTx)
          Set whether the listener is track by transaction
 String toString()
           
 void unregisterConnection(Object handle)
          Unregister a connection
protected  void unregisterConnections()
           
 void used()
          Mark the connection as used
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.resource.spi.ConnectionEventListener
connectionClosed, localTransactionCommitted, localTransactionRolledback, localTransactionStarted
 

Field Detail

log

protected org.jboss.logging.Logger log

trace

protected boolean trace
Constructor Detail

BaseConnectionManager2.BaseConnectionEventListener

protected BaseConnectionManager2.BaseConnectionEventListener(javax.resource.spi.ManagedConnection mc,
                                                             ManagedConnectionPool mcp,
                                                             Object context,
                                                             org.jboss.logging.Logger log)
Method Detail

getManagedConnection

public javax.resource.spi.ManagedConnection getManagedConnection()
Description copied from interface: ConnectionListener
Retrieve the managed connection for this listener

Specified by:
getManagedConnection in interface ConnectionListener
Returns:
the managed connection

getManagedConnectionPool

public ManagedConnectionPool getManagedConnectionPool()
Description copied from interface: ConnectionListener
Retrieve the managed connection pool for this listener

Specified by:
getManagedConnectionPool in interface ConnectionListener
Returns:
the managed connection pool

getContext

public Object getContext()
Description copied from interface: ConnectionListener
Retrieve the context used by the pool

Specified by:
getContext in interface ConnectionListener
Returns:
the context

getState

public int getState()
Description copied from interface: ConnectionListener
Retrieve the state of this connection

Specified by:
getState in interface ConnectionListener
Returns:
the state

setState

public void setState(int newState)
Description copied from interface: ConnectionListener
Set the state of this connection

Specified by:
setState in interface ConnectionListener

isTimedOut

public boolean isTimedOut(long timeout)
Description copied from interface: ConnectionListener
Has the connection timed out?

Specified by:
isTimedOut in interface ConnectionListener
Parameters:
timeout - the timeout
Returns:
true for timed out, false otherwise

used

public void used()
Description copied from interface: ConnectionListener
Mark the connection as used

Specified by:
used in interface ConnectionListener

isTrackByTx

public boolean isTrackByTx()
Description copied from interface: ConnectionListener
Get whether the listener is track by transaction

Specified by:
isTrackByTx in interface ConnectionListener
Returns:
true for track by transaction, false otherwise

setTrackByTx

public void setTrackByTx(boolean trackByTx)
Description copied from interface: ConnectionListener
Set whether the listener is track by transaction

Specified by:
setTrackByTx in interface ConnectionListener
Parameters:
trackByTx - true for track by transaction, false otherwise

registerConnection

public void registerConnection(Object handle)
Description copied from interface: ConnectionListener
Register a new connection

Specified by:
registerConnection in interface ConnectionListener
Parameters:
handle - the connection handle

unregisterConnection

public void unregisterConnection(Object handle)
Description copied from interface: ConnectionListener
Unregister a connection

Specified by:
unregisterConnection in interface ConnectionListener
Parameters:
handle - the connection handle

isManagedConnectionFree

public boolean isManagedConnectionFree()
Description copied from interface: ConnectionListener
Is the managed connection free?

Specified by:
isManagedConnectionFree in interface ConnectionListener
Returns:
true when it is free

unregisterConnections

protected void unregisterConnections()

connectionErrorOccurred

public void connectionErrorOccurred(javax.resource.spi.ConnectionEvent ce)
May be overridden to e.g. remove from tx map.

Specified by:
connectionErrorOccurred in interface javax.resource.spi.ConnectionEventListener
Parameters:
ce -

enlist

public void enlist()
            throws SystemException
Description copied from interface: ConnectionListener
Enlist the managed connection

Specified by:
enlist in interface ConnectionListener
Throws:
SystemException

delist

public void delist()
            throws javax.resource.ResourceException
Description copied from interface: ConnectionListener
Delist the managed connection

Specified by:
delist in interface ConnectionListener
Throws:
javax.resource.ResourceException

hasPermit

public boolean hasPermit()
Description copied from interface: ConnectionListener
Whether the connection has a permit

Specified by:
hasPermit in interface ConnectionListener
Returns:
true when it has permit, false otherwise

grantPermit

public void grantPermit(boolean value)
Description copied from interface: ConnectionListener
Tell the connection listener whether it owns the permit.

Specified by:
grantPermit in interface ConnectionListener
Parameters:
value - true for owning the permit, false otherwise

toString

public String toString()


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