|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface EventProducerInterface
The EventProducerInterface defines the registration operations of an eventproducer. This behavior includes adding and removing listeners for a specific event type.
(c) copyright 2002-2005 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl/event
License of use: Lesser
General Public License (LGPL) , no warranty
| Field Summary | |
|---|---|
static short |
FIRST_POSITION
The FIRST_POSITION in the queue |
static short |
LAST_POSITION
The LAST_POSITION in the queue |
| Method Summary | |
|---|---|
boolean |
addListener(EventListenerInterface listener,
EventType eventType)
adds a listener as strong reference to the BEGINNING of a queue of listeners. |
boolean |
addListener(EventListenerInterface listener,
EventType eventType,
boolean weak)
adds a listener to the BEGINNING of a queue of listeners. |
boolean |
addListener(EventListenerInterface listener,
EventType eventType,
short position)
adds a listener as strong reference to the specified position of a queue of listeners. |
boolean |
addListener(EventListenerInterface listener,
EventType eventType,
short position,
boolean weak)
adds a listener to the specified position of a queue of listeners. |
EventType[] |
getEventTypes()
returns all the eventTypes for which a listener can subscribe. |
boolean |
removeListener(EventListenerInterface listener,
EventType eventType)
removes the subscription of a listener for a specific event. |
| Field Detail |
|---|
static final short FIRST_POSITION
static final short LAST_POSITION
| Method Detail |
|---|
boolean addListener(EventListenerInterface listener,
EventType eventType)
throws java.rmi.RemoteException
listener - the listener which is interested at events of eventtype.eventType - the events of interest.
java.rmi.RemoteException - If a network connection failure occurs.WeakReference
boolean addListener(EventListenerInterface listener,
EventType eventType,
boolean weak)
throws java.rmi.RemoteException
listener - the listener which is interested at events of eventtype.eventType - the events of interest.weak - whether or not the listener is added as weak reference.
java.rmi.RemoteException - If a network connection failure occurs.WeakReference
boolean addListener(EventListenerInterface listener,
EventType eventType,
short position)
throws java.rmi.RemoteException
listener - the listener which is interested at events of eventtype.eventType - the events of interest.position - the position of the listener in the queue.
java.rmi.RemoteException - If a network connection failure occurs.WeakReference
boolean addListener(EventListenerInterface listener,
EventType eventType,
short position,
boolean weak)
throws java.rmi.RemoteException
listener - which is interested at certain events,eventType - the events of interest.position - the position of the listener in the queueweak - whether the reference should be weak or strong.
java.rmi.RemoteException - If a network connection failure occurs.
EventType[] getEventTypes()
throws java.rmi.RemoteException
java.rmi.RemoteException - If a network connection failure occurs.
boolean removeListener(EventListenerInterface listener,
EventType eventType)
throws java.rmi.RemoteException
listener - which is no longer interested.eventType - the event which is of no interest any more.
java.rmi.RemoteException - If a network connection failure occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||