I have read the section, Tracking client connections and disconnections, in the Channel API for Java documentation.
It has the following code:
// In the handler for _ah/channel/connected/
ChannelService channelService = ChannelServiceFactory.getChannelService();
ChannelPresence presence = channelService.parsePresence(req);
How would I create a handler for _ah/channel/connected/
or _ah/channel/disconnected
? I want to notify or alert connected users when a user is disconnected.