|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.corona.collaboration.CollaborationEventRouter
org.eclipse.corona.collaboration.ecf.ECFEventRouter
public abstract class ECFEventRouter
Field Summary | |
---|---|
protected org.osgi.framework.BundleContext |
m_Context
Bundle context for this event router |
protected java.util.HashMap |
m_Topics
|
Constructor Summary | |
---|---|
ECFEventRouter(org.osgi.framework.BundleContext context)
Class constructor. |
Method Summary | |
---|---|
void |
addTopicListener(java.lang.String topicName,
ITopicListener topicListener)
Add an event listener for the specified topic. |
void |
dispose()
Dispose resources used by this class instance. |
protected ITopic |
getTopic(java.lang.String topicName)
Retrieve the instance of Topic associated with the specified event. |
abstract void |
handleEvent(org.osgi.service.event.Event osgiEvent)
Handle the event from OSGI. |
abstract void |
processEvent(java.lang.Object event)
Process events. |
protected void |
removeTopic(ITopic topic,
boolean bForce)
Remove the specified topic from this event router. |
protected void |
removeTopic(java.lang.String topicKey,
boolean bForce)
Remove the specified topic from this event router. |
void |
removeTopicListener(java.lang.String topicName,
ITopicListener topicListener)
Remove an event listener for the specified topic. |
void |
sendMessage(ITopic topic,
CollaborationEvent collabEvent)
Send event to members of the topic. |
void |
sendMessage(ITopic topic,
org.osgi.service.event.Event osgiEvent)
Send event to members of the topic. |
protected boolean |
suppressSend(CollaborationEvent collabEvent)
Determine if the event should be sent to other clients |
protected boolean |
suppressSend(org.osgi.service.event.Event osgiEvent)
Determine if the event should be sent to other clients |
Methods inherited from class org.eclipse.corona.collaboration.CollaborationEventRouter |
---|
close, getID, postEvent, sendEvent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.HashMap m_Topics
protected org.osgi.framework.BundleContext m_Context
Constructor Detail |
---|
public ECFEventRouter(org.osgi.framework.BundleContext context)
context
- Bundle context associated with the bundle that
created the class instance.Method Detail |
---|
public abstract void processEvent(java.lang.Object event)
processEvent
in interface ICoronaEventRouter
event
- The event to be processed.public abstract void handleEvent(org.osgi.service.event.Event osgiEvent)
handleEvent
in interface org.osgi.service.event.EventHandler
handleEvent
in class CollaborationEventRouter
osgiEvent
- The OSGI event to be handled.Event
public void dispose()
public void sendMessage(ITopic topic, CollaborationEvent collabEvent)
topic
- The topic to whose members are to receive the event.osgiEvent
- The event to be sent.public void sendMessage(ITopic topic, org.osgi.service.event.Event osgiEvent)
sendMessage
in interface ICoronaEventRouter
topic
- The topic to whose members are to receive the event.osgiEvent
- The event to be sent.
TODO deprecate this method - use sendMessage(ITopic, CollaborationEvent)protected boolean suppressSend(CollaborationEvent collabEvent)
osgiEvent
- The OSGIevent currently being processed.
true indicates the message should be
suppressed. false
indicates the message
should be sent.
protected boolean suppressSend(org.osgi.service.event.Event osgiEvent)
osgiEvent
- The OSGIevent currently being processed.
true indicates the message should be
suppressed. false
indicates the message
should be sent.
TODO deprecate this method - use suppressSend(CollaborationEvent)
public void addTopicListener(java.lang.String topicName, ITopicListener topicListener)
addTopicListener
in interface ICoronaEventRouter
topicName
- Topic the event listener is for.topictListener
- The event listener to process the event.public void removeTopicListener(java.lang.String topicName, ITopicListener topicListener)
ICoronaEventRouter
removeTopicListener
in interface ICoronaEventRouter
topicName
- Topic the event listener is for.topicListener
- The event listener to process the event.protected ITopic getTopic(java.lang.String topicName)
topicName
- Name of topic whose topic instance is to be retrieved.
protected void removeTopic(ITopic topic, boolean bForce)
topic
- An ITopic instance that represents the topic
to be removed.bForce
- Flag that indicates if the topic should be removed
if client exists on the topic.protected void removeTopic(java.lang.String topicKey, boolean bForce)
topic
- An ITopic instance that represents the topic
to be removed.bForce
- Flag that indicates if the topic should be removed
if client exists on the topic.
|
Copyright 2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |