TPTP 4.1.0 Monitoring Tools Project
Public API Specification

org.eclipse.hyades.logging.adapter
Interface IComponentBroker

All Known Implementing Classes:
ComponentBroker

public interface IComponentBroker

Event broker is used to accept incomming data from registered producers and reroute to registered consumers. This is running under a multi-threaded environment. Event broker implementations should create a queue to receive data coming from event producers.


Method Summary
 void addEventConsumer(IComponent con)
          Adds the component that will be the consumer of the event data
 void flushAndTerminate()
          Flush the events left in the queue to the consumers and terminate the broker.
 void queueEvents(java.lang.Object[] obj)
          Queue the specified events for processing by the consumers
 void setNextBroker(IComponentBroker next)
          Set the next component broker
 void start()
          Start the component broker.
 

Method Detail

addEventConsumer

public void addEventConsumer(IComponent con)
Adds the component that will be the consumer of the event data

Parameters:
con - - consumer component of the data

queueEvents

public void queueEvents(java.lang.Object[] obj)
Queue the specified events for processing by the consumers

Parameters:
obj - - array of event objects to add to the queue for processing

setNextBroker

public void setNextBroker(IComponentBroker next)
Set the next component broker

Parameters:
next - component broker

start

public void start()
Start the component broker.


flushAndTerminate

public void flushAndTerminate()
                       throws java.lang.InterruptedException
Flush the events left in the queue to the consumers and terminate the broker.

Throws:
java.lang.InterruptedException

TPTP 4.1.0 Monitoring Tools Project
Public API Specification