Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
public interface EndpointListener {
    void endpointRegistered(InternalEndpoint endpoint);
    void endpointUnregistered(InternalEndpoint endpoint);
}

You can find an example endpoint listener here.

ExchangeListener

Code Block
public interface ExchangeListener {
    void exchangeSent(Exchange exchange);
    void exchangeDelivered(Exchange exchange);
    void exchangeFailed(Exchange exchange);
}

An example exchange listener can be found here.

Registering listeners

Listeners can be registered in two ways, either directly on the NMR:

...

Code Block
<bean id="myListener" class="...">
  ...
</bean>

<!-- Exchange Listener -->
<osgi:service ref="myListnermyListener" interface="org> 
    <osgi:interfaces>
        <value>org.apache.servicemix.nmr.api.event.ExchangeListener" />
ExchangeListener</value>
        <value>org.apache.servicemix.nmr.api.event.Listener</value>
    </osgi:interfaces>
</osgi:service>

#top

Wiki Markup
{scrollbar}