org.apache.servicemix.jbi.deployer.artifacts
Class AssemblyReferencesListener
java.lang.Object
org.apache.servicemix.jbi.deployer.artifacts.AssemblyReferencesListener
- All Implemented Interfaces:
- java.util.EventListener, EndpointListener, ExchangeListener, Listener
public class AssemblyReferencesListener
- extends java.lang.Object
- implements EndpointListener, ExchangeListener
This class will listen for endpoints activated and link them to service assemblies.
This only work if the endpoint is activated synchronously during a call to the SU
init() or start() method, but this should always be the case.
When an exchange is sent or received, the source / destination endpoint of the exchange
are retrieved, and their associated service assembly counter is incremented.
When a SA is cleanly shutdown, we wait for the reference count to be 0.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AssemblyReferencesListener
public AssemblyReferencesListener()
setAssembly
public void setAssembly(ServiceAssembly assembly)
forget
public void forget(ServiceAssembly assembly)
endpointRegistered
public void endpointRegistered(InternalEndpoint endpoint)
- Specified by:
endpointRegistered in interface EndpointListener
endpointUnregistered
public void endpointUnregistered(InternalEndpoint endpoint)
- Specified by:
endpointUnregistered in interface EndpointListener
exchangeSent
public void exchangeSent(Exchange exchange)
- Specified by:
exchangeSent in interface ExchangeListener
exchangeDelivered
public void exchangeDelivered(Exchange exchange)
- Specified by:
exchangeDelivered in interface ExchangeListener
exchangeFailed
public void exchangeFailed(Exchange exchange)
- Specified by:
exchangeFailed in interface ExchangeListener
waitFor
public void waitFor(ServiceAssembly assembly)
throws java.lang.InterruptedException
- Throws:
java.lang.InterruptedException
cancelPendingSyncExchanges
public void cancelPendingSyncExchanges(ServiceAssembly assembly)
getPending
protected java.util.Set<InternalExchange> getPending(ServiceAssembly assembly)
Copyright © 2005-2010 The Apache Software Foundation. All Rights Reserved.