org.aselect.agent.ntservice
Class AgentEventManager

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector
              extended by org.aselect.agent.ntservice.AgentEventManager
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess

public class AgentEventManager
extends java.util.Vector

The agent event manager.

Description:
This manager manages events of type AgentEvent.

Note: this manager is implemented as a Singleton.

Concurrency issues:
none.

Author:
Alfa & Ariss
See Also:
AgentEvent, Serialized Form

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Method Summary
 void addAgentEventListener(IAgentEventListener oListener)
          Add a new listener for Agent events.
 void dispatchAgentEvent(int iEventID)
          Dispatch an Agent event.
static AgentEventManager getInstance()
          Get a static handle to the AgentEventManager instance.
 void removeAgentEventListener(IAgentEventListener oListener)
          Removes a listener for Agent events.
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Method Detail

getInstance

public static AgentEventManager getInstance()
Get a static handle to the AgentEventManager instance.

Description:
Checks if a static instance exists, otherwise it is created. This instance is returned.

Concurrency issues:
-

Preconditions:
-

Postconditions:
A static instance of the AgentEventManager exists.

Returns:
A static handle to the AgentEventManager

dispatchAgentEvent

public void dispatchAgentEvent(int iEventID)
Dispatch an Agent event.

Description:
Dispatches a Agent event to all listeners.

Concurrency issues:
-

Preconditions:
-

Postconditions:
-

Parameters:
iEventID - The ID of the event.

addAgentEventListener

public void addAgentEventListener(IAgentEventListener oListener)
Add a new listener for Agent events.

Description:
Adds the given IAgentEventListener to the listeners.

Concurrency issues:
-

Preconditions:
oListener != null

Postconditions:
The listeners contains the given listener.

Parameters:
oListener - The IAgentEventListener to add.

removeAgentEventListener

public void removeAgentEventListener(IAgentEventListener oListener)
Removes a listener for Agent events.

Description:
Removes the given IAgentEventListener from the listeners.

Concurrency issues:
-

Preconditions:
oListener != null

Postconditions:
The listeners does not contain the given listener.

Parameters:
oListener - The IAgentEventListener to remove.


Copyright © 2008 SURFnet BV. All Rights Reserved.