org.eclipse.corona.collaboration.ecf
Class EventRouterClient

java.lang.Object
  extended by org.eclipse.corona.collaboration.ecf.EventRouterClient

public class EventRouterClient
extends java.lang.Object


Field Summary
(package private)  boolean m_bSendToOSGI
          Flag that indicates if the OSGI event manager should be used to send and recieve client events.
 
Constructor Summary
EventRouterClient(org.osgi.framework.BundleContext context)
          Class constructor.
EventRouterClient(org.osgi.framework.BundleContext context, boolean bSendToOSGI)
          Class constructor.
 
Method Summary
 void addEventListener(java.lang.String topicName, ITopicListener topicListener)
          Add an event listener for the specified topic.
 void dispose()
          Remove resource used by this instance.
 void removeAllEventListeners()
          Remove all event listeners used by this client.
 void removeEventListener(java.lang.String topicName, ITopicListener topicListener)
          Remove an event listener for the specified topic.
 void sendEvent(org.osgi.service.event.Event event)
          Send an event.
 void sendEvent(java.lang.String topic, java.util.Dictionary props)
          Send an event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_bSendToOSGI

boolean m_bSendToOSGI
Flag that indicates if the OSGI event manager should be used to send and recieve client events.

Constructor Detail

EventRouterClient

public EventRouterClient(org.osgi.framework.BundleContext context)
Class constructor. Performs basic initialization for the class instance.

Parameters:
context - The bundle context associated with the current bundle.
bSendToOSGI - true indicates that events are to be sent to the OSGI event manager. false indicates that events are to be sent directly to the Corona ECF Event Router. Specifing false does not allow local users of the OSGI event manager to see the event.

EventRouterClient

public EventRouterClient(org.osgi.framework.BundleContext context,
                         boolean bSendToOSGI)
Class constructor. Performs basic initialization for the class instance.

Parameters:
context - The bundle context associated with the current bundle.
bSendToOSGI - true indicates that events are to be sent to the OSGI event manager. false indicates that events are to be sent directly to the Corona ECF Event Router. Specifing false does not allow local users of the OSGI event manager to see the event.
Method Detail

dispose

public void dispose()
Remove resource used by this instance.


sendEvent

public void sendEvent(java.lang.String topic,
                      java.util.Dictionary props)
Send an event.

Parameters:
topic - The topic to send the event to.
props - The properties associated with the event.

sendEvent

public void sendEvent(org.osgi.service.event.Event event)
Send an event.

Parameters:
event - The event to be sent.

addEventListener

public void addEventListener(java.lang.String topicName,
                             ITopicListener topicListener)
Add an event listener for the specified topic.

Parameters:
topicName - Namr of the topicc the event listener is for.
topicListener - The topic listener to process topic events.

removeEventListener

public void removeEventListener(java.lang.String topicName,
                                ITopicListener topicListener)
Remove an event listener for the specified topic.

Parameters:
topicName - Namr of the topicc the event listener is for.
topicListener - The topic listener to be removved.

removeAllEventListeners

public void removeAllEventListeners()
Remove all event listeners used by this client.


Copyright 2006 IBM Corporation and others.
All Rights Reserved.