|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.corona.collaboration.ecf.AbstractTopic
public abstract class AbstractTopic
Constructor Summary | |
---|---|
AbstractTopic()
|
Method Summary | |
---|---|
void |
addListener(ITopicListener eventListener)
Add an topic listener for the specified topic. |
void |
addUser(org.eclipse.ecf.core.user.IUser userInfo)
|
protected abstract void |
createContainer()
Create the shared object container that represents the topic. |
void |
dispose()
Dispose of resources used by the instance of the class. |
protected abstract org.eclipse.ecf.provider.generic.SOContainer |
getContainer()
Get the shared object container that represents the topic. |
org.eclipse.ecf.core.identity.ID |
getContainerID()
Return the container ID for the associated topic |
java.lang.String[] |
getMembers()
Retrieve the current members of the group. |
org.eclipse.ecf.core.identity.ID |
getServerID()
Return the ID of the server that is hosting the topic. |
protected CoronaTopicSharedObject |
getSharedObject()
Retrieve the shared object assoicated with the container. |
org.eclipse.ecf.core.identity.ID |
getTopicID()
Get the topic ID. |
java.lang.String |
getTopicName()
Get the name of the topic. |
java.lang.String |
getTopicURL()
Get the topic URL. |
void |
initTopic(java.lang.String protocol,
java.lang.String serverName,
int serverPort,
java.lang.String topicName)
Class constructor. |
void |
postMessageToTopicListeners(java.lang.Object msgObject)
Post the message to the registered topic event listeners |
void |
removeListener(ITopicListener topicListener)
Remove an topic listener for the specified topic. |
void |
removeUser(org.eclipse.ecf.core.user.IUser userInfo)
|
void |
sendMessage(java.lang.String[] ids,
java.lang.Object msgObject)
Send message to specified users. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractTopic()
Method Detail |
---|
public void initTopic(java.lang.String protocol, java.lang.String serverName, int serverPort, java.lang.String topicName) throws java.lang.Exception
protocol
- Protocol used for communication.serverName
- The name/IP address of the server hosting the topic.serverPort
- The port the server is listening on.topicName
- The name of the topic.
java.lang.Exception
public void dispose()
dispose
in interface ITopic
protected abstract void createContainer() throws java.lang.Exception
java.lang.Exception
protected abstract org.eclipse.ecf.provider.generic.SOContainer getContainer()
public java.lang.String getTopicName()
getTopicName
in interface ITopicUser
public java.lang.String getTopicURL()
public org.eclipse.ecf.core.identity.ID getTopicID()
public void sendMessage(java.lang.String[] ids, java.lang.Object msgObject) throws java.io.IOException
sendMessage
in interface ITopicUser
ids
- An array of user ids to send message to. If the value is null or the
array is empty all members of the topic will be send the message.msgObject
- Message to be send. This object and all container objects must
be serializable.
java.io.IOException
protected CoronaTopicSharedObject getSharedObject()
public java.lang.String[] getMembers()
getMembers
in interface ITopicUser
public void addUser(org.eclipse.ecf.core.user.IUser userInfo)
addUser
in interface ITopicUser
public void removeUser(org.eclipse.ecf.core.user.IUser userInfo)
removeUser
in interface ITopicUser
public void addListener(ITopicListener eventListener)
addListener
in interface ITopicUser
topicListener
- The topic listener to process events for the topic.public void removeListener(ITopicListener topicListener)
removeListener
in interface ITopicUser
topicListener
- The topic listener to be removed.public void postMessageToTopicListeners(java.lang.Object msgObject)
postMessageToTopicListeners
in interface ITopic
msgObject
- Object message to be posted. Usually this will
be an OSGI event.public org.eclipse.ecf.core.identity.ID getContainerID()
public org.eclipse.ecf.core.identity.ID getServerID()
|
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 |