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

java.lang.Object
  extended by org.eclipse.corona.collaboration.ecf.AbstractTopic
      extended by org.eclipse.corona.collaboration.ecf.container.Topic
All Implemented Interfaces:
ITopic, ITopicUser

public class Topic
extends AbstractTopic

The Topic class is used to associate an event topic with an ECF container. For each defined event topic there will be one Topic instance. Each Topic instance will contain a single ECF shared object. The ECF shared object will be used to communicate with other members of the event topic.


Constructor Summary
Topic(org.eclipse.ecf.provider.generic.TCPServerSOContainerGroup groupsContainer, org.osgi.framework.BundleContext context, java.lang.String protocol, java.lang.String serverHost, int serverHostPort, java.lang.String topicName)
          Class constructor.
 
Method Summary
protected  void createContainer()
          Create the shared object container that represents the topic.
 void dispose()
          Dispose of resources used by the instance of the class.
protected  org.eclipse.ecf.provider.generic.SOContainer getContainer()
          Get the shared object container that represents the topic.
 
Methods inherited from class org.eclipse.corona.collaboration.ecf.AbstractTopic
addListener, addUser, getContainerID, getMembers, getServerID, getSharedObject, getTopicID, getTopicName, getTopicURL, initTopic, postMessageToTopicListeners, removeListener, removeUser, sendMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Topic

public Topic(org.eclipse.ecf.provider.generic.TCPServerSOContainerGroup groupsContainer,
             org.osgi.framework.BundleContext context,
             java.lang.String protocol,
             java.lang.String serverHost,
             int serverHostPort,
             java.lang.String topicName)
      throws java.lang.Exception
Class constructor. Performs basic initialization for the class instance.

Parameters:
groupsContainer - Container to hold topics.
context - Bundle context for bundle.
protocol - Protocol used for communication.
serverHost - The name/IP address of the server hosting the topics.
serverHostPort - The port the server is listening on.
topicName - The name of the topic.
Throws:
java.lang.Exception
Method Detail

createContainer

protected void createContainer()
                        throws java.lang.Exception
Create the shared object container that represents the topic. The method is invoked by the initTopic method to create the shared object container.

Specified by:
createContainer in class AbstractTopic
Throws:
java.lang.Exception

dispose

public void dispose()
Dispose of resources used by the instance of the class.

Specified by:
dispose in interface ITopic
Overrides:
dispose in class AbstractTopic

getContainer

protected org.eclipse.ecf.provider.generic.SOContainer getContainer()
Get the shared object container that represents the topic.

Specified by:
getContainer in class AbstractTopic
Returns:
The shared object container that represents the topic.

Copyright 2006 IBM Corporation and others.
All Rights Reserved.