Interface DeliveredMessageListener

All Superinterfaces:

public interface DeliveredMessageListener
extends EventListener

DeliveredMessageListener is introduced in order to support server-side subscription to pub/sub server's channels. A implementation of this interface is needed to register on local client before this client subscribes itself to server's channels in order to have the listener notifieid when message is published to the channels. For example:

   PubSubServer server = FactoryFinder.getFactory(FactoryFinder.PUBSUBSERVER_FACTORY);
   LocalClient client = server.getClientManager().createLocalClient();
   client.registerMessageListener(new MyDeliveredMessageListener());
   server.subscribeToChannel(client, "/foo/bar");

See Also:
PubSubServer.subscribeToChannel(LocalClient, String)

Method Summary
 void onPublish(DeliveredMessageEvent event)
          Notification that the local client received an event message.

Method Detail


void onPublish(DeliveredMessageEvent event)
Notification that the local client received an event message. This method is not thread-safe, Pub/Sub Server may call it concurrently in multiple threads.

event - - the notification event

Documentation is available at
Copyright 1996,2008, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners.