com.bigbross.bossa.notify
Interface Listener

All Known Implementing Classes:
HistoryListener

public interface Listener

This interface should be implemented by a class that wants to be registered in the notification bus.

Author:
BigBross Team

Method Summary
 String getId()
          Returns the id of this listener.
 Resource getResource()
          Returns the resource used to further filter the work item or activity related events passed to this listener.
 boolean interested(int type)
          Indicates if this listener is interested in an event type.
 void notifyEvent(Event event)
          Notifies this listener of an event.
 

Method Detail

getId

public String getId()
Returns the id of this listener. This id must be unique with respect to the desired notification bus.

Returns:
the id of this listener.

interested

public boolean interested(int type)
Indicates if this listener is interested in an event type. The notification bus will only notify this listener of the event types it is interested.

Parameters:
type - the type of the event.
Returns:
true if this listener is interested in the event, false otherwise.

getResource

public Resource getResource()
Returns the resource used to further filter the work item or activity related events passed to this listener. The notification bus will only notify this listener of events associated with resources that contain the resource returned by this method. If the resource returned is null, no resource filtering will happen.

Returns:
the resource to be used as filter.

notifyEvent

public void notifyEvent(Event event)
Notifies this listener of an event. See the event class for the information provided to the listener.

Parameters:
event - the event.
See Also:
Event


Copyright © 2003,2004 OpenBR Sistemas S/C Ltda.