jpl.mipl.mdms.web.domain
Class ConnectionPoller

java.lang.Object
  extended by jpl.mipl.mdms.web.domain.ConnectionPoller

public class ConnectionPoller
extends Object

Purpose: Periodically polls server groups for connection metrics.

   Copyright 2006, California Institute of Technology.
   ALL RIGHTS RESERVED.
   U.S. Government Sponsorship acknowledge. 2006.
   
 ============================================================================
 Modification History :
 ----------------------

 Date              Who              What
 ----------------------------------------------------------------------------
 09/15/2006        Nick             Initial Release
 ============================================================================
 

Version:
$Id: ConnectionPoller.java,v 1.4 2007/08/29 21:56:35 awt Exp $
Author:
Nicholas Toole (Nicholas.T.Toole@jpl.nasa.gov)

Field Summary
protected  ChannelManager channelManager
           
protected  MessageUtil messageUtil
           
protected  TimerTask timerTask
           
protected  Timer timerThread
           
protected  long waitTime
           
 
Constructor Summary
ConnectionPoller(ChannelManager manager, long waitTime)
          Constructor
 
Method Summary
 void cancel()
          Stops the scheduler
protected  void init()
           
 void poll()
          Polls all server groups.
protected  void pollChannel(String groupName, Channel channel)
          Poll a particular channel
 void start()
          Start the scheduler to periodically poll server groups
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

channelManager

protected ChannelManager channelManager

waitTime

protected long waitTime

timerThread

protected Timer timerThread

timerTask

protected TimerTask timerTask

messageUtil

protected MessageUtil messageUtil
Constructor Detail

ConnectionPoller

public ConnectionPoller(ChannelManager manager,
                        long waitTime)
Constructor

Parameters:
manager - Channel manager
waitTime - Number of milliseconds between polling instances
Method Detail

init

protected void init()

poll

public void poll()
Polls all server groups.


pollChannel

protected void pollChannel(String groupName,
                           Channel channel)
Poll a particular channel

Parameters:
groupName - Name of the server group to be polled
channel - Channel to which request will be written

start

public void start()
Start the scheduler to periodically poll server groups


cancel

public void cancel()
Stops the scheduler