cmsc433.p1
Interface Listener<E>

Type Parameters:
E - The type of notification messages.
All Known Implementing Classes:
LogGatherListen, LogGatherProgress

public interface Listener<E>

Interface for classes that can be registered as listeners. Once registered with a Listenable object, notify will be called when a noteworthy event occurs.


Method Summary
 void notify(java.lang.Object target, E event)
          This function is called whenever an event occurs that is associated with one of the objects with which this Listener is registered.
 

Method Detail

notify

void notify(java.lang.Object target,
            E event)
This function is called whenever an event occurs that is associated with one of the objects with which this Listener is registered.

Parameters:
event - The event that occurred. For our logging framework, this will be a LogRecord.
target - The object that generated the event. For our logging framework, this is the Log object to which the LogRecord was added.