org.cometd.bayeux.server
Interface ServerSession.MaxQueueListener

All Superinterfaces:
BayeuxListener, java.util.EventListener, ServerSession.ServerSessionListener
Enclosing interface:
ServerSession

public static interface ServerSession.MaxQueueListener
extends ServerSession.ServerSessionListener


Method Summary
 boolean queueMaxed(ServerSession session, Session from, Message message)
          Call back to notify if a message for a client will result in the message queue exceeding Session#getMaxQueue().
 

Method Detail

queueMaxed

boolean queueMaxed(ServerSession session,
                   Session from,
                   Message message)
Call back to notify if a message for a client will result in the message queue exceeding Session#getMaxQueue(). This is called with the client instance locked, so it is safe for the handler to manipulate the queue returned by Session#getQueue(), but action in the callback that may result in another Client instance should be avoided as that would risk deadlock.

Parameters:
session - Client message is being delivered to
from - Client message is published from
message -
Returns:
true if the message should be added to the client queue


Copyright © 2010 Dojo Foundation. All Rights Reserved.