org.cometd.bayeux.client
Interface ClientSession.Extension

Enclosing interface:
ClientSession

public static interface ClientSession.Extension

Extension API for client session.

An extension allows user code to interact with the Bayeux protocol as late as messages are sent or as soon as messages are received.

Messages may be modified, or state held, so that the extension adds a specific behavior simply by observing the flow of Bayeux messages.

See Also:
ClientSession.addExtension(Extension)

Method Summary
 boolean rcv(ClientSession session, Message.Mutable message)
          Callback method invoked every time a normal message is received.
 boolean rcvMeta(ClientSession session, Message.Mutable message)
          Callback method invoked every time a meta message is received.
 boolean send(ClientSession session, Message.Mutable message)
          Callback method invoked every time a normal message is being sent.
 boolean sendMeta(ClientSession session, Message.Mutable message)
          Callback method invoked every time a meta message is being sent.
 

Method Detail

rcv

boolean rcv(ClientSession session,
            Message.Mutable message)
Callback method invoked every time a normal message is received.

Parameters:
session - the session object that is receiving the message
message - the message received
Returns:
true if message processing should continue, false if it should stop

rcvMeta

boolean rcvMeta(ClientSession session,
                Message.Mutable message)
Callback method invoked every time a meta message is received.

Parameters:
session - the session object that is receiving the meta message
message - the meta message received
Returns:
true if message processing should continue, false if it should stop

send

boolean send(ClientSession session,
             Message.Mutable message)
Callback method invoked every time a normal message is being sent.

Parameters:
session - the session object that is sending the message
message - the message being sent
Returns:
true if message processing should continue, false if it should stop

sendMeta

boolean sendMeta(ClientSession session,
                 Message.Mutable message)
Callback method invoked every time a meta message is being sent.

Parameters:
session - the session object that is sending the message
message - the meta message being sent
Returns:
true if message processing should continue, false if it should stop


Copyright © 2008-2010 Dojo Foundation. All Rights Reserved.