The Robot Application Programming Interface Delegate Project
RAPID Logo

AgentEventCollector Class Reference

AgentEventCollector handles the collection and distribution of rapid events for a particular agent. More...

Inheritance diagram for AgentEventCollector:
Collaboration diagram for AgentEventCollector:

List of all members.

Public Member Functions

 AgentEventCollector (Agent agent)
void addEventListener (MessageType type, IRapidEventListener listener) throws RapidEventCollectorException
 Add a new message listener.
void addEventListener (MessageType[] types, IRapidEventListener listener) throws RapidEventCollectorException
void removeEventListener (MessageType type, IRapidEventListener listener)
 remove listener for given MessageType
void removeEventListener (MessageType[] types, IRapidEventListener listener)
void removeEventListener (IRapidEventListener listener)
 remove listener for all MessageTypes
boolean hasReaderFor (MessageType type)
void messageReceived (final Agent agent, final MessageType msgType, final IRapidMessage msg)
 Callback when a message in the factory is received.

Protected Member Functions

DataReaderAdapter createReaderFor (MessageType type) throws RapidEventCollectorException
 Create a DataReader and register with dds.

Protected Attributes

final Agent m_agent
final Map< MessageType,
RapidEventListenerList
m_typeToListenersMap
final Map< MessageType,
RapidDataReaderAdapter
m_typeToReaderMap
final ExecutorService m_threadPool

Detailed Description

Author:
mallan

Constructor & Destructor Documentation

Parameters:
agent

Here is the call graph for this function:


Member Function Documentation

void addEventListener ( MessageType  type,
IRapidEventListener  listener 
) throws RapidEventCollectorException

If this collector does not already have a Reader listening for telemetry, one will be created and registered. If a Reader does already exist, the listener will immediately receive the last MessageType event that was read.

Parameters:
type
listener
Exceptions:
RapidEventCollectorException

Here is the call graph for this function:

void addEventListener ( MessageType[]  types,
IRapidEventListener  listener 
) throws RapidEventCollectorException

Here is the call graph for this function:

DataReaderAdapter createReaderFor ( MessageType  type) throws RapidEventCollectorException [protected]
Parameters:
type
Returns:
DataReaderAdapter
Exceptions:
RapidEventCollectorException

Here is the call graph for this function:

boolean hasReaderFor ( MessageType  type)
Returns:
true if a reader for given type exists
void messageReceived ( final Agent  agent,
final MessageType  msgType,
final IRapidMessage  msg 
)

This means that there was a message received in the DDS Pipe

Here is the call graph for this function:

void removeEventListener ( MessageType[]  types,
IRapidEventListener  listener 
)

Here is the call graph for this function:

void removeEventListener ( MessageType  type,
IRapidEventListener  listener 
)
Parameters:
type
listener

Here is the call graph for this function:

void removeEventListener ( IRapidEventListener  listener)
Parameters:
listener

Here is the call graph for this function:


Member Data Documentation

final Agent m_agent [protected]
final ExecutorService m_threadPool [protected]
Initial value:
        Collections.synchronizedMap(new HashMap<MessageType,RapidEventListenerList>())
Initial value:
        Collections.synchronizedMap(new HashMap<MessageType,RapidDataReaderAdapter>())

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines