com.stc.connector.framework.eway
Interface ManagedConnectionCallback

All Known Implementing Classes:
STCManagedConnection

public interface ManagedConnectionCallback

Interface used by the EwayConnection to request services from the ManagedConnection.

Version:
$Version$
Author:
$Author: kgambrel $

Method Summary
 void addConnectionHandle(AssociateableHandle connHandle)
          Adds a connection handle to the ManagedConnection instance.
 int getConnectionHandleCount()
          Gets the current number active connection handles associated with an instance of ManagedConnection.
 EwayConnection getEwayConnection()
          Get the EwayConnection instance associated with the ManagedConnectionCallback instance.
 javax.resource.spi.ManagedConnection getManagedConnection()
          Get the ManagedConnection instance associated with the ManagedConnectionCallback instance.
 void notifyConnectionEvent(javax.resource.spi.ConnectionEvent event)
          Notify the ManagedConnectionCallback associated with the EwayConnection instance that a connection event had occurred.
 void removeConnectionHandle(AssociateableHandle connHandle)
          Removes a connection handle from the ManagedConnection instance.
 

Method Detail

notifyConnectionEvent

public void notifyConnectionEvent(javax.resource.spi.ConnectionEvent event)
Notify the ManagedConnectionCallback associated with the EwayConnection instance that a connection event had occurred.

Parameters:
event - A ConnectionEvent instance containing the event that had occurred.

getEwayConnection

public EwayConnection getEwayConnection()
Get the EwayConnection instance associated with the ManagedConnectionCallback instance.

Returns:
The instance of EwayConnection associated with the ManagedConnection instance.

getManagedConnection

public javax.resource.spi.ManagedConnection getManagedConnection()
Get the ManagedConnection instance associated with the ManagedConnectionCallback instance.

Returns:
The instance of ManagedConnection associated with the ManagedConnection instance.

addConnectionHandle

public void addConnectionHandle(AssociateableHandle connHandle)
Adds a connection handle to the ManagedConnection instance. The connection handle must be already associated with the ManagedConnection instance.

Parameters:
connHandle - An connection handle which implements the AssociateableHandle.

removeConnectionHandle

public void removeConnectionHandle(AssociateableHandle connHandle)
Removes a connection handle from the ManagedConnection instance. The connection handle must be removed from the ManagedConnection instance prior to associating itself to another ManagedConnection instance.

Parameters:
connHandle - An connection handle which implements the AssociateableHandle.

getConnectionHandleCount

public int getConnectionHandleCount()
Gets the current number active connection handles associated with an instance of ManagedConnection.

Returns:
The current number of active connection handles assoiciated with an instance of ManagedConnection;