org.ow2.petals.component.framework.process
Class ExternalListenerManager

java.lang.Object
  extended by org.ow2.petals.component.framework.process.ExternalListenerManager

public class ExternalListenerManager
extends java.lang.Object

This manager is used to enable a binding component to handle external service call. It manages listeners for external services (start and stop).

Author:
ofabre - EBM Websourcing

Constructor Summary
ExternalListenerManager(AbstractComponent component)
          Creates a new instance of ExternalListenerManager
 
Method Summary
 void createListeners(java.lang.String serviceUnitName, java.util.List<org.ow2.petals.component.framework.jbidescriptor.generated.Consumes> consumesList)
           
 void removeListeners(java.lang.String serviceUnitName)
          Remove the SU bound listeners.
 void startListening(java.lang.String serviceUnitName)
          Start a listener for each given consumes.
 void stopListening(java.lang.String serviceUnitName)
          Stop all external listeners related to the given SU.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExternalListenerManager

public ExternalListenerManager(AbstractComponent component)
Creates a new instance of ExternalListenerManager

Parameters:
componentConfiguration -
component -
componentContext -
deliveryChannel -
logger -
Method Detail

createListeners

public void createListeners(java.lang.String serviceUnitName,
                            java.util.List<org.ow2.petals.component.framework.jbidescriptor.generated.Consumes> consumesList)
                     throws org.ow2.petals.component.framework.api.exception.PEtALSCDKException
Throws:
org.ow2.petals.component.framework.api.exception.PEtALSCDKException

startListening

public void startListening(java.lang.String serviceUnitName)
                    throws org.ow2.petals.component.framework.api.exception.PEtALSCDKException
Start a listener for each given consumes.

Parameters:
serviceUnitName - name of the service unit to start
consumes - the consumes nodes defining external services to listen. Not null
Throws:
org.ow2.petals.component.framework.api.exception.PEtALSCDKException - if an error occurs during listener starting

stopListening

public void stopListening(java.lang.String serviceUnitName)
                   throws org.ow2.petals.component.framework.api.exception.PEtALSCDKException
Stop all external listeners related to the given SU.

Parameters:
serviceUnitName - name of the service unit to start
Throws:
org.ow2.petals.component.framework.api.exception.PEtALSCDKException - if an error occurs during listener starting

removeListeners

public void removeListeners(java.lang.String serviceUnitName)
Remove the SU bound listeners.



Copyright © 2005-2011 Petals Link (EBM Websourcing). All Rights Reserved.