org.apache.cometd.bayeux
Interface Listener


public interface Listener

Cometd Listener interface.
For local clients, in order to receive messages, they pass in a callback object when the local client is created using the Bayeux.newClient(String,Listener) method. This callback object, implementing the Listener interface, is used to deliver messages to local, in JVM, clients.

Author:
Greg Wilkins, Filip Hanik

Method Summary
 void deliver(Message[] msg)
          Invoked when a message is delivered to the client.
 void removed(boolean timeout)
          This method is called when the client is removed (explicitly or from a timeout)
 

Method Detail

removed

void removed(boolean timeout)
This method is called when the client is removed (explicitly or from a timeout)

Parameters:
timeout - - true if the client was removed from a timeout false if it was removed explicitly.

deliver

void deliver(Message[] msg)
Invoked when a message is delivered to the client. The message contains the message itself, as well as what channel this message came through and who the sender is. If someone invoked Client.deliver(Message) then the channel reference will be null.

Parameters:
msg -


Copyright © 2000-2009 Apache Software Foundation. All Rights Reserved.