org.abraracourcix.alipes.monitors.url
Class URLMonitor

java.lang.Object
  extended byorg.abraracourcix.alipes.monitors.AbstractMonitor
      extended byorg.abraracourcix.alipes.monitors.PollingMonitor
          extended byorg.abraracourcix.alipes.monitors.url.URLMonitor
All Implemented Interfaces:
Monitor, java.lang.Runnable

public class URLMonitor
extends PollingMonitor

Concrete implementation of a PollingMonitor. Given a URL or a collection of URLs it checks their status.

Author:
jdt

Constructor Summary
URLMonitor(Listener listener, long pollingFrequency)
          Constructor
URLMonitor(Listener listener, long pollingFrequency, java.net.URL url)
          Constructor
URLMonitor(Listener listener, java.net.URL url)
          Constructor defaults to polling every 60 seconds
 
Method Summary
 void addNewURL(java.net.URL url)
          Add a new URL to the list we monitor
 void pole()
          Pole the URLs
 
Methods inherited from class org.abraracourcix.alipes.monitors.PollingMonitor
getPollingFrequency, run, setPollingFrequency, start
 
Methods inherited from class org.abraracourcix.alipes.monitors.AbstractMonitor
signalListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLMonitor

public URLMonitor(Listener listener,
                  long pollingFrequency)
Constructor

Parameters:
listener - who's listening
pollingFrequency - in seconds

URLMonitor

public URLMonitor(Listener listener,
                  long pollingFrequency,
                  java.net.URL url)
Constructor

Parameters:
listener - who's listening
pollingFrequency - in seconds
url - the url to poll

URLMonitor

public URLMonitor(Listener listener,
                  java.net.URL url)
Constructor defaults to polling every 60 seconds

Parameters:
listener - who's listening
url - the url to poll
Method Detail

addNewURL

public final void addNewURL(java.net.URL url)
Add a new URL to the list we monitor

Parameters:
url - url to add

pole

public final void pole()
Pole the URLs

Specified by:
pole in class PollingMonitor
See Also:
org.abraracourcix.alipes.monitors.AbstractMonitor#pole()


Copyright © 2004-2005 Abraracourcix. All Rights Reserved.