Class ActivityExtension

java.lang.Object
org.cometd.server.ext.ActivityExtension
All Implemented Interfaces:
BayeuxServer.Extension

public class ActivityExtension extends Object implements BayeuxServer.Extension

Monitors the activity of ServerSessions and disconnects them after a period of inactivity.

The inactivity of a particular ServerSession is determined in two ways:

  • Only the client is inactive, that is the client only sends periodic /meta/connect messages but no other messages, while the server may send messages to the client; this is configured via ActivityExtension.Activity.CLIENT
  • Both the client and the server are inactive, that is neither the client nor the server send messages apart the periodic /meta/connect messages; this is configured via ActivityExtension.Activity.CLIENT_SERVER

When the inactivity exceeds a configurable inactive period, the ServerSession is disconnected.