org.directwebremoting.extend
Interface ServerLoadMonitor

All Known Implementing Classes:
AbstractServerLoadMonitor, DefaultServerLoadMonitor, PollingServerLoadMonitor, SmallSiteServerLoadMonitor, ThreadDroppingServerLoadMonitor

public interface ServerLoadMonitor

Polling or Comet style interactive web applications require something to monitor high levels of server load to ensure that

Author:
Joe Walker [joe at getahead dot ltd dot uk]

Method Summary
 long getConnectedTime()
          What's the longest time that we should wait before asking the client to reconnect?
 int getDisconnectedTime()
          Controller for poll times.
 void shutdown()
          Kill all available long-poll requests
 void threadWaitEnding(WaitController controller)
          A thread has just ended a wait period.
 void threadWaitStarting(WaitController controller)
          A thread is about to begin a wait period.
 

Method Detail

getDisconnectedTime

int getDisconnectedTime()
Controller for poll times.

TODO: We should probably get rid of this and leave it to PollHandler?

Returns:
How long should this client wait until it next polls?

getConnectedTime

long getConnectedTime()
What's the longest time that we should wait before asking the client to reconnect?

Returns:
The maximum client connected time

threadWaitStarting

void threadWaitStarting(WaitController controller)
A thread is about to begin a wait period. This can be used by implementations to dynamically adjust the poll timings.

Parameters:
controller - An object that we can use to control the wait

threadWaitEnding

void threadWaitEnding(WaitController controller)
A thread has just ended a wait period. This can be used by implementations to dynamically adjust the poll timings.

Parameters:
controller - An object that we can use to control the wait

shutdown

void shutdown()
Kill all available long-poll requests


Copyright ¬ 2005