public class ActivityExtension extends BayeuxServer.Extension.Adapter
ServerSessions and disconnects them after a period of inactivity.
The inactivity of a particular ServerSession is determined in two ways:
/meta/connect
messages but no other messages, while the server may send messages to the client; this is
configured via ActivityExtension.Activity.CLIENT/meta/connect messages; this is configured via
ActivityExtension.Activity.CLIENT_SERVERinactive period,
the ServerSession is disconnected.| Modifier and Type | Class and Description |
|---|---|
static class |
ActivityExtension.Activity
The possible activity to monitor
|
static class |
ActivityExtension.SessionExtension
Monitors the activity of a single
ServerSession, disconnecting it
when the max inactivity period is exceeded. |
BayeuxServer.Extension.Adapter| Constructor and Description |
|---|
ActivityExtension(ActivityExtension.Activity activity,
long maxInactivityPeriod)
Creates a
ActivityExtension to be installed in the BayeuxServer |
| Modifier and Type | Method and Description |
|---|---|
ActivityExtension.Activity |
getActivity() |
long |
getMaxInactivityPeriod() |
protected ServerSession.Extension |
newSessionExtension(ServerSession session,
ServerMessage handshakeReply)
Creates a new
ServerSession.Extension that monitors the activity of the given ServerSession |
boolean |
sendMeta(ServerSession to,
ServerMessage.Mutable message) |
rcv, rcvMeta, sendpublic ActivityExtension(ActivityExtension.Activity activity, long maxInactivityPeriod)
ActivityExtension to be installed in the BayeuxServeractivity - the activity to monitormaxInactivityPeriod - the max inactivity period, in millisecondspublic ActivityExtension.Activity getActivity()
public long getMaxInactivityPeriod()
public boolean sendMeta(ServerSession to, ServerMessage.Mutable message)
sendMeta in interface BayeuxServer.ExtensionsendMeta in class BayeuxServer.Extension.Adapterprotected ServerSession.Extension newSessionExtension(ServerSession session, ServerMessage handshakeReply)
ServerSession.Extension that monitors the activity of the given ServerSessionsession - the ServerSession to monitorhandshakeReply - the handshake reply messageServerSession.Extension that monitors the ServerSession activityCopyright © 2008-2013 Dojo Foundation. All Rights Reserved.