com.microfocus.cobol.connector.spi
Class CobolConnectionEventListener

java.lang.Object
  extended bycom.microfocus.cobol.connector.spi.CobolConnectionEventListener
All Implemented Interfaces:
ConnectionEventListener, EventListener, Serializable

public class CobolConnectionEventListener
extends Object
implements ConnectionEventListener, Serializable

The connector architecture provides an event callback mechanism that enables an application server to receive notifications from a ManagedConnection instance. The App server implements this class in order to listen to event notifications from ManagedConnection instance.

See Also:
Serialized Form

Constructor Summary
CobolConnectionEventListener(ManagedConnection mcon)
          Create a connection event listener.
 
Method Summary
protected  void addConnectorListener(ConnectionEventListener l)
          Add a connection listener to the list of listeners.
 void connectionClosed(ConnectionEvent event)
          Send a connection closed event.
 void connectionErrorOccurred(ConnectionEvent event)
          Send a connection error occured event.
 void localTransactionCommitted(ConnectionEvent event)
          Send a local transaction commited event
 void localTransactionRolledback(ConnectionEvent event)
          Send a local transaction rolled back event
 void localTransactionStarted(ConnectionEvent event)
          Send a local transaction started event
protected  void removeConnectorListener(ConnectionEventListener l)
          Remove a connection listener from the list of listeners.
protected  void sendEvent(int eventType, Exception ex, Object connectionHandle)
          Send the event to all listeners of the connectionEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CobolConnectionEventListener

public CobolConnectionEventListener(ManagedConnection mcon)
Create a connection event listener.

Parameters:
mcon - CobolManagedConnection instance
Method Detail

sendEvent

protected void sendEvent(int eventType,
                         Exception ex,
                         Object connectionHandle)
Send the event to all listeners of the connectionEvent

Parameters:
eventType - The event type.
ex - The exception to be associated with Connection event.
connectionHandle - The connection handle to be associated with Connection event.

addConnectorListener

protected void addConnectorListener(ConnectionEventListener l)
Add a connection listener to the list of listeners.

Parameters:
l - The connection listener.

removeConnectorListener

protected void removeConnectorListener(ConnectionEventListener l)
Remove a connection listener from the list of listeners.

Parameters:
l - The connection listener.

connectionClosed

public void connectionClosed(ConnectionEvent event)
Send a connection closed event.

Specified by:
connectionClosed in interface ConnectionEventListener
Parameters:
event - The connection event.

connectionErrorOccurred

public void connectionErrorOccurred(ConnectionEvent event)
Send a connection error occured event.

Specified by:
connectionErrorOccurred in interface ConnectionEventListener
Parameters:
event - The connection event.

localTransactionCommitted

public void localTransactionCommitted(ConnectionEvent event)
Send a local transaction commited event

Specified by:
localTransactionCommitted in interface ConnectionEventListener
Parameters:
event - Connection event instance

localTransactionRolledback

public void localTransactionRolledback(ConnectionEvent event)
Send a local transaction rolled back event

Specified by:
localTransactionRolledback in interface ConnectionEventListener
Parameters:
event - Connection event instance

localTransactionStarted

public void localTransactionStarted(ConnectionEvent event)
Send a local transaction started event

Specified by:
localTransactionStarted in interface ConnectionEventListener
Parameters:
event - Connection event instance



Copyright © 2000 Micro Focus International Limited. All rights reserved.
This document and the proprietary marks and names used herein are protected by international law.