com.mulesoft.adapter.ra
Class XIConnectionEventListenerManager

java.lang.Object
  extended by com.mulesoft.adapter.ra.XIConnectionEventListenerManager

public class XIConnectionEventListenerManager
extends Object

JCA provides an event callback mechanism that enables a J2EE application server to receive notifications from a ManagedConnection instance. The J2EE server implements this class in order to listen to event notifications from ManagedConnectiony instances. XiConnectionEventListenerManager manages the received J2EE ConnectionEventLIsteners and sends events to them if requested by the the sendEvent() method. It is neither a JCA CCI nor spi related interface implementation. (ra implementation specific)


Constructor Summary
XIConnectionEventListenerManager(javax.resource.spi.ManagedConnection mc)
          Creates a event listener manager for one particular ManagedConenction.
 
Method Summary
 void addConnectorListener(javax.resource.spi.ConnectionEventListener listener)
          Add a ConnectionEventListener to send events to it (ra implementation specific)
 void removeConnectorListener(javax.resource.spi.ConnectionEventListener listener)
          Remove a given ConnectionEventListener from the manager (ra implementation specific)
 void sendEvent(int eventType, Exception ex, Object connectionHandle)
          Sends a ConnectionEvent to all registered ConnectionEventListeners.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XIConnectionEventListenerManager

public XIConnectionEventListenerManager(javax.resource.spi.ManagedConnection mc)
Creates a event listener manager for one particular ManagedConenction. (ra implementation specific)

Parameters:
mc - Managed connection for which the ConnectionEventListener are registered.
Method Detail

sendEvent

public void sendEvent(int eventType,
                      Exception ex,
                      Object connectionHandle)
Sends a ConnectionEvent to all registered ConnectionEventListeners. (ra implementation specific)

Parameters:
eventType - One of the ConnectionEvent event types
ex - Exception if event is related to an exception, might be null
connectionHandle - An object that represents the "handle" to the ManagedConnection, might be null

addConnectorListener

public void addConnectorListener(javax.resource.spi.ConnectionEventListener listener)
Add a ConnectionEventListener to send events to it (ra implementation specific)

Parameters:
listener - ConnectionEventListener to add

removeConnectorListener

public void removeConnectorListener(javax.resource.spi.ConnectionEventListener listener)
Remove a given ConnectionEventListener from the manager (ra implementation specific)

Parameters:
listener - ConnectionEventListener to remove


Copyright © 2012. All Rights Reserved.