org.directwebremoting.impl
Class SmallSiteServerLoadMonitor

java.lang.Object
  extended by org.directwebremoting.impl.AbstractServerLoadMonitor
      extended by org.directwebremoting.impl.SmallSiteServerLoadMonitor
All Implemented Interfaces:
ServerLoadMonitor

public class SmallSiteServerLoadMonitor
extends AbstractServerLoadMonitor
implements ServerLoadMonitor

A default implementation of ServerLoadMonitor

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

Field Summary
 
Fields inherited from class org.directwebremoting.impl.AbstractServerLoadMonitor
waitControllers
 
Constructor Summary
SmallSiteServerLoadMonitor()
           
 
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.
 boolean supportsStreaming()
          If the server is not going to be streaming then we need to tell browsers to just use XHR rather than anything fancier.
 
Methods inherited from class org.directwebremoting.impl.AbstractServerLoadMonitor
shutdown, shutdownRandomWaitControllers, threadWaitEnding, threadWaitStarting
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.directwebremoting.extend.ServerLoadMonitor
shutdown, threadWaitEnding, threadWaitStarting
 

Constructor Detail

SmallSiteServerLoadMonitor

public SmallSiteServerLoadMonitor()
Method Detail

supportsStreaming

public boolean supportsStreaming()
Description copied from interface: ServerLoadMonitor
If the server is not going to be streaming then we need to tell browsers to just use XHR rather than anything fancier.

Specified by:
supportsStreaming in interface ServerLoadMonitor
Returns:
true if the server will be supporting streaming

getConnectedTime

public long getConnectedTime()
Description copied from interface: ServerLoadMonitor
What's the longest time that we should wait before asking the client to reconnect?

Specified by:
getConnectedTime in interface ServerLoadMonitor
Returns:
The maximum client connected time

getDisconnectedTime

public int getDisconnectedTime()
Description copied from interface: ServerLoadMonitor
Controller for poll times.

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

Specified by:
getDisconnectedTime in interface ServerLoadMonitor
Returns:
How long should this client wait until it next polls?