org.abraracourcix.alipes.listeners.status
Class StatusListener

java.lang.Object
  extended byorg.abraracourcix.alipes.monitors.AbstractMonitor
      extended byorg.abraracourcix.alipes.listeners.status.StatusListener
All Implemented Interfaces:
Listener, Monitor

public final class StatusListener
extends AbstractMonitor
implements Listener

This listener merely retains a list of the latest statuses, and the times they were received. It will also alert any listeners to the change of state.

Author:
jdt

Nested Class Summary
 class StatusListener.ResourceInfo
           
 
Constructor Summary
StatusListener(Listener listener)
          Constructor
 
Method Summary
 void eventOccurred(Event event, java.lang.Object resource)
          Log the event, and keep a record of it
 java.util.Map getStatuses()
           
 
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

StatusListener

public StatusListener(Listener listener)
Constructor

Parameters:
listener - who's listening?
Method Detail

eventOccurred

public void eventOccurred(Event event,
                          java.lang.Object resource)
                   throws ListenerException
Log the event, and keep a record of it

Specified by:
eventOccurred in interface Listener
Parameters:
event - what has happened
resource - to what
Throws:
ListenerException - a listener may throw a subclass of ListenerException if something goes wrong when it tries to log the exception.
See Also:
Listener.eventOccurred(org.abraracourcix.alipes.common.Event, java.lang.Object)

getStatuses

public java.util.Map getStatuses()
Returns:
Returns the statuses.


Copyright © 2004-2005 Abraracourcix. All Rights Reserved.