org.eclipse.corona.collaboration.ecf.container
Class EventRouter

java.lang.Object
  extended by org.eclipse.corona.collaboration.CollaborationEventRouter
      extended by org.eclipse.corona.collaboration.ecf.ECFEventRouter
          extended by org.eclipse.corona.collaboration.ecf.container.EventRouter
All Implemented Interfaces:
ICoronaEventRouter, IServerEventRouter, org.osgi.service.event.EventHandler

public class EventRouter
extends ECFEventRouter
implements IServerEventRouter


Field Summary
static java.lang.String TEST_TOPIC
           
 
Fields inherited from class org.eclipse.corona.collaboration.ecf.ECFEventRouter
m_Topics
 
Constructor Summary
EventRouter(org.osgi.framework.BundleContext context, java.lang.String protocol, java.lang.String hostName, int port)
          Class constructor.
 
Method Summary
 ITopicUser createTopic(java.lang.String topicName)
          Create new topic.
 void handleEvent(org.osgi.service.event.Event osgiEvent)
          Handle the event from OSGI.
 void processEvent(java.lang.Object event)
          Process events.
 
Methods inherited from class org.eclipse.corona.collaboration.ecf.ECFEventRouter
addTopicListener, dispose, getTopic, removeTopic, removeTopic, removeTopicListener, sendMessage, sendMessage, suppressSend, suppressSend
 
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
 
Methods inherited from interface org.eclipse.corona.collaboration.ecf.interfaces.ICoronaEventRouter
addTopicListener, removeTopicListener, sendMessage
 

Field Detail

TEST_TOPIC

public static final java.lang.String TEST_TOPIC
See Also:
Constant Field Values
Constructor Detail

EventRouter

public EventRouter(org.osgi.framework.BundleContext context,
                   java.lang.String protocol,
                   java.lang.String hostName,
                   int port)
            throws java.lang.Exception
Class constructor. Performs basic initialization for the class instance.

Parameters:
context - Bundle context associated with the bundle that created the class instance.
Throws:
java.lang.Exception
Method Detail

processEvent

public void processEvent(java.lang.Object event)
Process events. The event are received from ALL defined groups and members.

Specified by:
processEvent in interface ICoronaEventRouter
Specified by:
processEvent in class ECFEventRouter
Parameters:
event - The event to be processed.

handleEvent

public void handleEvent(org.osgi.service.event.Event osgiEvent)
Handle the event from OSGI. The event topic will be examined to determine what group is being used to send events to members of that topic. If a group does not exist for the topic a group will be created.

Specified by:
handleEvent in interface org.osgi.service.event.EventHandler
Specified by:
handleEvent in class ECFEventRouter
Parameters:
osgiEvent - The OSGI event to be handled.
See Also:
Event

createTopic

public ITopicUser createTopic(java.lang.String topicName)
Create new topic. This method can be invoked from the server instance of the shared object.

Specified by:
createTopic in interface IServerEventRouter
Parameters:
topicName - Name of topic.

Copyright 2006 IBM Corporation and others.
All Rights Reserved.