org.eclipse.corona.collaboration.ecf.sharedobject
Class CoronaTopicSharedObject

java.lang.Object
  extended by org.eclipse.ecf.core.sharedobject.AbstractSharedObject
      extended by org.eclipse.corona.collaboration.ecf.sharedobject.TopicSharedObject
          extended by org.eclipse.corona.collaboration.ecf.sharedobject.CoronaTopicSharedObject
All Implemented Interfaces:
org.eclipse.core.runtime.IAdaptable, org.eclipse.ecf.core.IIdentifiable, org.eclipse.ecf.core.ISharedObject, org.eclipse.ecf.core.util.IEventHandler, org.eclipse.ecf.core.util.IEventProcessor

public class CoronaTopicSharedObject
extends TopicSharedObject


Field Summary
 
Fields inherited from class org.eclipse.corona.collaboration.ecf.sharedobject.TopicSharedObject
lock, m_ReplicateOnActivated, m_ReplicateOnJoin
 
Constructor Summary
CoronaTopicSharedObject()
          Class contructor.
CoronaTopicSharedObject(java.lang.String containerName)
          Class contructor.
 
Method Summary
 void createTopic(java.lang.String topic, org.eclipse.ecf.core.identity.ID fromID)
          Create a topic.
 org.eclipse.ecf.core.identity.ID getHomeID()
          Get the ID of the home container for this shared object.
protected  void processMessage(java.lang.Object message)
          Process a message from a member of the group to which the shared object belongs.
 void setTopicCreated(java.lang.String topic)
          Indicates a topic has been creted on the server.
 
Methods inherited from class org.eclipse.corona.collaboration.ecf.sharedobject.TopicSharedObject
acceptEvent, dispose, getID, getProperty, handleActivated, handleCreateResponse, handleDeparted, handleJoined, handlePrimaryActivated, handleReplicaActivated, initialize, processEvent, sendMessage, sendMessage, sendSharedMessage, sendSharedMessage, sendSharedObjectMsg
 
Methods inherited from class org.eclipse.ecf.core.sharedobject.AbstractSharedObject
addEventProcessor, clearEventProcessors, creationCompleted, destroyRemote, destroySelf, destroySelfLocal, dispose, fireEventProcessors, getAdapter, getConfig, getContext, getGroupID, getHomeContainerID, getLocalContainerID, getProperties, getReplicaDescription, getReplicaDescriptions, getSharedObjectMsgFromEvent, handleEvent, handleEvents, handleSharedObjectCreateResponseEvent, handleSharedObjectMsg, handleSharedObjectMsgEvent, handleUnhandledEvent, init, isConnected, isPrimary, removeEventProcessor, replicateToRemoteContainers, sendSharedObjectMsgTo, sendSharedObjectMsgToPrimary, sendSharedObjectMsgToSelf
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CoronaTopicSharedObject

public CoronaTopicSharedObject()
Class contructor. Performs basic initialization for class instance. This contructor should not be used. It is defined so class can be instantiated during replication.


CoronaTopicSharedObject

public CoronaTopicSharedObject(java.lang.String containerName)
                        throws org.eclipse.ecf.core.identity.IDInstantiationException
Class contructor. Performs basic initialization for class instance.

Parameters:
containerName - Name of container hosting shared object.
Throws:
org.eclipse.ecf.core.identity.IDInstantiationException
Method Detail

getHomeID

public org.eclipse.ecf.core.identity.ID getHomeID()
Get the ID of the home container for this shared object. This should be the ID of the server, since all shared object are orginally created in the server and replicated to the various clients.


createTopic

public void createTopic(java.lang.String topic,
                        org.eclipse.ecf.core.identity.ID fromID)
Create a topic. A server group will be created to allow communicate between members of the topic. This method is called on the server as a result of a sharedObjectMsg invoking the method. The processing of this method will be passed to the EventRouter.

Parameters:
topic - Name of the topic to be created.
fromID - ID of container requesting the group be created.

setTopicCreated

public void setTopicCreated(java.lang.String topic)
Indicates a topic has been creted on the server. This method is called on the client as a result of a sharedObjectMsg invoking the method. The processing of this method will be passed on to the EventRouter.

Parameters:
topic - Name of the topic that was created.

processMessage

protected void processMessage(java.lang.Object message)
Process a message from a member of the group to which the shared object belongs. The processing of the message will be passed on to the EventRouter.

Overrides:
processMessage in class TopicSharedObject
Parameters:
message - Message to be processed

Copyright 2006 IBM Corporation and others.
All Rights Reserved.