Class GoneUserSessionExtension
java.lang.Object
org.mortbay.cometd.continuation.GoneUserSessionExtension
- All Implemented Interfaces:
org.cometd.bayeux.server.ServerSession.Extension
public class GoneUserSessionExtension
extends Object
implements org.cometd.bayeux.server.ServerSession.Extension
Delivers no message to the session of a user disabled or deleted since the
handshake, on any node. It is added to each session that holds a user of the
store, at the handshake, because only a session's own extensions run for each
subscriber of a broadcast: the server-wide extensions see a broadcast once,
at its publication, with no target session.
It runs for a direct delivery as well as for a broadcast, so it is the one
check of a message's delivery. A non-meta message to such a session is
dropped and the session is disconnected. disconnect() removes the
session, queues the /meta/disconnect reply and flushes the session,
which wakes the held long poll: the held connection returns at once when the
disconnect happens on a delivery to it. Only a held connection that no
message reaches goes on until its next connect, which
GoneUserExtension ends, or until its poll timeout.
The check goes through EXoContinuationBayeux.isSessionUserActive(ServerSession),
which reads the user only when the user's generation in the conversation
registry differs from the session's.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.cometd.bayeux.server.ServerMessagesend(org.cometd.bayeux.server.ServerSession sender, org.cometd.bayeux.server.ServerSession session, org.cometd.bayeux.server.ServerMessage message) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cometd.bayeux.server.ServerSession.Extension
incoming, outgoing, rcv, rcvMeta, sendMeta
-
Constructor Details
-
GoneUserSessionExtension
-
-
Method Details
-
send
public org.cometd.bayeux.server.ServerMessage send(org.cometd.bayeux.server.ServerSession sender, org.cometd.bayeux.server.ServerSession session, org.cometd.bayeux.server.ServerMessage message) - Specified by:
sendin interfaceorg.cometd.bayeux.server.ServerSession.Extension
-