com.bankframe.ei.txnhandler.connector.offline
Class OffLineManagedConnection

java.lang.Object
  extended bycom.bankframe.ei.txnhandler.connector.offline.OffLineManagedConnection
All Implemented Interfaces:
EManagedConnection

public class OffLineManagedConnection
extends java.lang.Object
implements EManagedConnection

This class represents a physical connection to the underlying OffLine Database.


Constructor Summary
OffLineManagedConnection()
          OffLineManagedConnection constructor.
OffLineManagedConnection(EManagedConnectionFactory mcf, java.sql.Connection con)
          OffLineManagedConnection constructor.
 
Method Summary
 void addConnectionEventListener(EConnectionEventListener listener)
          This method adds an event listener to this managed connection's list of listeners.
 boolean checkIfDestroyed()
          This method checks to see if the associated connection has been destroyed.
 void cleanup()
          This method will close any live connections still associated with the managed connection.
 void destroy()
          This method will close any live connections still associated with the managed connection.
 java.lang.Object getConnection()
          This method creates a new connection handle for the underlying physical connection represented by the EManagedConnection instance.
 EManagedConnectionFactory getManagedConnectionFactory()
          This method returns the EManagedConnectionFactory associated with this connection.
 java.lang.Object getPhysicalConnection()
          This method creates a new connection handle for the underlying physical connection represented by the EManagedConnection instance.
 void removeConnectionEventListener(EConnectionEventListener listener)
          This connection removes a specified event listener from it's list.
 void sendEvent(int eventType, java.lang.Exception ex)
          This method will send an event to all the listeners in it's listener list, notifying listeners of a Connection closing event or connection error event.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OffLineManagedConnection

public OffLineManagedConnection()
OffLineManagedConnection constructor.


OffLineManagedConnection

public OffLineManagedConnection(EManagedConnectionFactory mcf,
                                java.sql.Connection con)
OffLineManagedConnection constructor.

Parameters:
mcf - The EManagedConnectionFactory instance associated with this connection.
con - A java SQL Connection to be associated with this managed connection.
Method Detail

addConnectionEventListener

public void addConnectionEventListener(EConnectionEventListener listener)
This method adds an event listener to this managed connection's list of listeners.

Specified by:
addConnectionEventListener in interface EManagedConnection
Parameters:
listener - The listener to be added to this list.

checkIfDestroyed

public boolean checkIfDestroyed()
This method checks to see if the associated connection has been destroyed.

Returns:
True if the connection has been closed.

cleanup

public void cleanup()
This method will close any live connections still associated with the managed connection.

Specified by:
cleanup in interface EManagedConnection

destroy

public void destroy()
This method will close any live connections still associated with the managed connection.

Specified by:
destroy in interface EManagedConnection

getConnection

public java.lang.Object getConnection()
This method creates a new connection handle for the underlying physical connection represented by the EManagedConnection instance.

Specified by:
getConnection in interface EManagedConnection
Returns:
A new connection handle.

getManagedConnectionFactory

public EManagedConnectionFactory getManagedConnectionFactory()
This method returns the EManagedConnectionFactory associated with this connection.

Returns:
A EManagedConnectionFactory instance.

getPhysicalConnection

public java.lang.Object getPhysicalConnection()
This method creates a new connection handle for the underlying physical connection represented by the EManagedConnection instance.

Returns:
A new connection handle.

removeConnectionEventListener

public void removeConnectionEventListener(EConnectionEventListener listener)
This connection removes a specified event listener from it's list.

Specified by:
removeConnectionEventListener in interface EManagedConnection
Parameters:
listener - The listener to remove from the list.

sendEvent

public void sendEvent(int eventType,
                      java.lang.Exception ex)
This method will send an event to all the listeners in it's listener list, notifying listeners of a Connection closing event or connection error event.

Parameters:
eventType - The Event Type to be sent. See the EConnectionEvent class fields for details on event integers.
ex - Any exceptions that are thrown with the event.


Copyright © 2004 Siebel Systems, Inc. All rights reserved.