Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.directwebremoting.impl
Class AbstractServerLoadMonitor

    java.lang.Object
      org.directwebremoting.impl.AbstractServerLoadMonitor

All Implemented Interfaces:
  ServerLoadMonitor

Direct Known Subclasses:
  DefaultServerLoadMonitor, PollingServerLoadMonitor, SmallSiteServerLoadMonitor, ThreadDroppingServerLoadMonitor

    public abstract class AbstractServerLoadMonitor

extends java.lang.Object
implements ServerLoadMonitor

A base implementation of `ServerLoadMonitor` that implements waiting functionallity, mostly to provide `shutdown()`.

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

Constructor Summary
`AbstractServerLoadMonitor()`

Method Summary
`void` | `shutdown()` Kill all available long-poll requests
`void` | `shutdownRandomWaitControllers(int count)` If there are too many WaitControllers waiting then we can kill one off at random.
`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.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Methods inherited from interface org.directwebremoting.extend.ServerLoadMonitor
`getConnectedTime, getDisconnectedTime`

Constructor Detail

### AbstractServerLoadMonitor

    public AbstractServerLoadMonitor()

Method Detail

### threadWaitStarting

    public void threadWaitStarting(WaitController controller)

  Description copied from interface: `ServerLoadMonitor`
  A thread is about to begin a wait period. This can be used by implementations to dynamically adjust the poll timings.

  Specified by:
    `threadWaitStarting` in interface `ServerLoadMonitor`
  Parameters:
    `controller` - An object that we can use to control the wait

### threadWaitEnding

    public void threadWaitEnding(WaitController controller)

  Description copied from interface: `ServerLoadMonitor`
  A thread has just ended a wait period. This can be used by implementations to dynamically adjust the poll timings.

  Specified by:
    `threadWaitEnding` in interface `ServerLoadMonitor`
  Parameters:
    `controller` - An object that we can use to control the wait

### shutdownRandomWaitControllers

    public void shutdownRandomWaitControllers(int count)

  If there are too many WaitControllers waiting then we can kill one off at random.

  Parameters:
    `count` - How many `WaitController`s do we shutdown?

### shutdown

    public void shutdown()

  Description copied from interface: `ServerLoadMonitor`
  Kill all available long-poll requests

  Specified by:
    `shutdown` in interface `ServerLoadMonitor`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¬ 2005
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD