com.bankframe.ei.txnhandler.connector
Class EConnectionEvent

java.lang.Object
  extended byjava.util.EventObject
      extended bycom.bankframe.ei.txnhandler.connector.EConnectionEvent
All Implemented Interfaces:
java.io.Serializable

public class EConnectionEvent
extends java.util.EventObject

The EConnectionEvent class provides information about the source of a connection related event. An EConnectionEvent instance contains the following information: Type of the connection event EManagedConnection instance that generated the connection event. An EManagedConnection instance is returned from the method EConnectionEvent.getSource. EConnection handle associated with the EManagedConnection instance; required for the CONNECTION_CLOSED event and optional for the other event types. Optionally, an exception indicating the connection related error. Note that exception is used for CONNECTION_ERROR_OCCURRED. This class defines following types of event notifications: CONNECTION_CLOSED CONNECTION_ERROR_OCCURRED

See Also:
Serialized Form

Field Summary
static int CONNECTION_CLOSED
           
static int CONNECTION_ERROR_OCCURRED
           
 
Constructor Summary
EConnectionEvent(EManagedConnection mc, int id)
          This method constructs an EConnectionEvent object.
EConnectionEvent(EManagedConnection mc, int id, java.lang.Exception ex)
          This method constructs an EConnectionEvent object.
 
Method Summary
 java.lang.Object getConnectionHandle()
          This method gets the connection handle associated with the Managed Connection instance.
 java.lang.Exception getException()
          This method gets the exception if one occurred.
 int getId()
          This method gets the type of the event.
 void setConnectionHandle(java.lang.Object connectionHandle)
          This method sets the Connection Handle.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CONNECTION_CLOSED

public static final int CONNECTION_CLOSED
See Also:
Constant Field Values

CONNECTION_ERROR_OCCURRED

public static final int CONNECTION_ERROR_OCCURRED
See Also:
Constant Field Values
Constructor Detail

EConnectionEvent

public EConnectionEvent(EManagedConnection mc,
                        int id)
This method constructs an EConnectionEvent object. Exception defaults to null.

Parameters:
mc - EManagedConnection that is the source of the Event
id - type of the EConnectionEvent

EConnectionEvent

public EConnectionEvent(EManagedConnection mc,
                        int id,
                        java.lang.Exception ex)
This method constructs an EConnectionEvent object.

Parameters:
mc - EManagedConnection that is the source of the Event
id - type of the EConnectionEvent
ex - Exception to be thrown to the application.
Method Detail

getConnectionHandle

public java.lang.Object getConnectionHandle()
This method gets the connection handle associated with the Managed Connection instance. Used for CONNECTION_CLOSED event.

Returns:
The Object representing the Managed Connection instance.

getException

public java.lang.Exception getException()
This method gets the exception if one occurred. This may be null.

Returns:
Exception thrown by the Event.

getId

public int getId()
This method gets the type of the event.

Returns:
Event type identifier.

setConnectionHandle

public void setConnectionHandle(java.lang.Object connectionHandle)
This method sets the Connection Handle. Used for the CONNECTION_CLOSED event.

Parameters:
connectionHandle - The Connection Handle object.


Copyright © 2005, 2007, Oracle. All rights reserved.