com.serotonin.m2m2.module
Class LongPollDefinition

java.lang.Object
  extended by com.serotonin.m2m2.module.ModuleElementDefinition
      extended by com.serotonin.m2m2.module.LongPollDefinition

public abstract class LongPollDefinition
extends ModuleElementDefinition

m2m2 uses AJAX extensively to implement both an effective and simple user interface, and rapid and automatic page updating for system monitoring. The long poll mechanism allows services in a page to request to be included in a single long poll request, such that updates directed to any of the requested services will be returned. By coalescing all services into a single request, m2m2 prevents conditions where an arbitrary number of AJAX requests are being made, potentially exceeding the maximum number of requests allowed by a single page. Long poll requests also utilize resources better than polling, and also result in better response times.

Author:
Matthew Lohbihler

Constructor Summary
LongPollDefinition()
           
 
Method Summary
abstract  com.serotonin.m2m2.web.dwr.longPoll.LongPollHandler getHandler()
           
 
Methods inherited from class com.serotonin.m2m2.module.ModuleElementDefinition
getModule, initialize, uninstall
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LongPollDefinition

public LongPollDefinition()
Method Detail

getHandler

public abstract com.serotonin.m2m2.web.dwr.longPoll.LongPollHandler getHandler()
Returns:
an instance of the long poll handler. Instances may be cached and reused.