org.cometd.bayeux.server
Interface BayeuxServer.Extension

Enclosing interface:
BayeuxServer

public static interface BayeuxServer.Extension

Extension API for bayeux server.

Implementations of this interface allow to modify incoming and outgoing messages respectively just before and just after they are handled by the implementation, either on client side or server side.

Extensions are be registered in order and one extension may allow subsequent extensions to process the message by returning true from the callback method, or forbid further processing by returning false.

See Also:
BayeuxServer.addExtension(Extension)

Method Summary
 boolean rcv(ServerSession from, ServerMessage.Mutable message)
          Callback method invoked every time a normal message is incoming.
 boolean rcvMeta(ServerSession from, ServerMessage.Mutable message)
          Callback method invoked every time a meta message is incoming.
 boolean send(ServerMessage.Mutable message)
          Callback method invoked every time a normal message is outgoing.
 boolean sendMeta(ServerSession to, ServerMessage.Mutable message)
          Callback method invoked every time a meta message is outgoing.
 

Method Detail

rcv

boolean rcv(ServerSession from,
            ServerMessage.Mutable message)
Callback method invoked every time a normal message is incoming.

Parameters:
from - the session that sent the message
message - the incoming message
Returns:
true if message processing should continue, false if it should stop

rcvMeta

boolean rcvMeta(ServerSession from,
                ServerMessage.Mutable message)
Callback method invoked every time a meta message is incoming.

Parameters:
from - the session that sent the message
message - the incoming meta message
Returns:
true if message processing should continue, false if it should stop

send

boolean send(ServerMessage.Mutable message)
Callback method invoked every time a normal message is outgoing.

Parameters:
to - the session receiving the message, or null for a publish
message - the outgoing message
Returns:
true if message processing should continue, false if it should stop

sendMeta

boolean sendMeta(ServerSession to,
                 ServerMessage.Mutable message)
Callback method invoked every time a meta message is outgoing.

Parameters:
to - the session receiving the message
message - the outgoing meta message
Returns:
true if message processing should continue, false if it should stop


Copyright © 2010 Dojo Foundation. All Rights Reserved.