org.abraracourcix.alipes.monitors
Class AbstractMonitor

java.lang.Object
  extended byorg.abraracourcix.alipes.monitors.AbstractMonitor
All Implemented Interfaces:
Monitor
Direct Known Subclasses:
Filter, PollingMonitor, StatusListener

public abstract class AbstractMonitor
extends java.lang.Object
implements Monitor

Does most of the grunt work of a monitor, signalling the listeners. Subclasses need to implement the pole method, and should call eventOccurred when they have something to say.

Author:
jdt *

Constructor Summary
AbstractMonitor(Listener listener)
          Constructor
 
Method Summary
protected  void signalListener(Event event, java.lang.Object resource)
          Subclasses can call this to signal to the listener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMonitor

public AbstractMonitor(Listener listener)
Constructor

Parameters:
listener - who's listening to this monitor?
Method Detail

signalListener

protected final void signalListener(Event event,
                                    java.lang.Object resource)
                             throws ListenerException
Subclasses can call this to signal to the listener

Parameters:
event - what happened
resource - to whom?
Throws:
ListenerException - whoopsie - the Listener threw something


Copyright © 2004-2005 Abraracourcix. All Rights Reserved.