|
|
|
|
|
|
|
|
|
|
|
|
Re: Understanding CDODataOutputImpl and CDODataInputImpl classes' methods [message #1418853 is a reply to message #1417285] |
Sun, 07 September 2014 15:12  |
Eclipse User |
|
|
|
Hi Eike,
Thanks for your answers.
I am trying to send string messages from one session to all other remote sessions using CDORemoteSessionManager. I can send the message. But I do not know how do I receive the message on the other end. This the code which I use to send the message. But I do not know if it is the right way of doing this.
I looked into the javadoc. But I did not understand how am I supposed to receive the sent message.
Could you please help me?
private void sendMessage() {
InternalCDORemoteSessionManager remoteSessionManager = new CDORemoteSessionManagerImpl();
remoteSessionManager.setLocalSession(this.getSession());
remoteSessionManager.setForceSubscription(true);
remoteSessionManager.activate();
CDORemoteSession[] recipients=remoteSessionManager.getRemoteSessions();
for(CDORemoteSession session:recipients)
{
remoteSessionManager.handleRemoteSessionSubscribed(session.getSessionID(), true);
}
CDORemoteSessionMessage message = new CDORemoteSessionMessage("Fist Message");
remoteSessionManager.sendMessage(message, recipients);
}
[Updated on: Sun, 07 September 2014 15:42] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03892 seconds