Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2008-08-13 10:35:52 +0000
committerEike Stepper2008-08-13 10:35:52 +0000
commitd892a8ea1dd81927c1b51908fc5ab5252825b2e3 (patch)
tree4ae18ba0d75e759840f6e8abd7e4f4712742b81b /plugins/org.eclipse.net4j.buddies.common
parent4edaf98c74c62bf5c53203572b68da6c7cf4ab25 (diff)
downloadcdo-d892a8ea1dd81927c1b51908fc5ab5252825b2e3.tar.gz
cdo-d892a8ea1dd81927c1b51908fc5ab5252825b2e3.tar.xz
cdo-d892a8ea1dd81927c1b51908fc5ab5252825b2e3.zip
[243987] Decouple Signal from IChannel
https://bugs.eclipse.org/bugs/show_bug.cgi?id=243987
Diffstat (limited to 'plugins/org.eclipse.net4j.buddies.common')
-rw-r--r--plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/common/ISession.java7
-rw-r--r--plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Collaboration.java4
-rw-r--r--plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/BuddyStateNotification.java6
-rw-r--r--plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/CollaborationLeftNotification.java6
-rw-r--r--plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/MessageNotification.java6
5 files changed, 17 insertions, 12 deletions
diff --git a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/common/ISession.java b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/common/ISession.java
index 05673f3a95..e10c4292e4 100644
--- a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/common/ISession.java
+++ b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/common/ISession.java
@@ -10,7 +10,7 @@
**************************************************************************/
package org.eclipse.net4j.buddies.common;
-import org.eclipse.net4j.channel.IChannel;
+import org.eclipse.net4j.signal.SignalProtocol;
import org.eclipse.net4j.util.event.INotifier;
import org.eclipse.core.runtime.IAdaptable;
@@ -20,7 +20,10 @@ import org.eclipse.core.runtime.IAdaptable;
*/
public interface ISession extends INotifier, IAdaptable
{
- public IChannel getChannel();
+ /**
+ * @since 2.0
+ */
+ public SignalProtocol getProtocol();
public IBuddy getSelf();
diff --git a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Collaboration.java b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Collaboration.java
index 4f53e4516e..b4b02b62ae 100644
--- a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Collaboration.java
+++ b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/Collaboration.java
@@ -18,6 +18,7 @@ import org.eclipse.net4j.buddies.common.IMembership;
import org.eclipse.net4j.buddies.common.IMessage;
import org.eclipse.net4j.buddies.internal.common.bundle.OM;
import org.eclipse.net4j.buddies.internal.common.protocol.MessageNotification;
+import org.eclipse.net4j.signal.SignalProtocol;
import org.eclipse.net4j.util.ObjectUtil;
import org.eclipse.net4j.util.event.Event;
import org.eclipse.net4j.util.event.IEvent;
@@ -166,7 +167,8 @@ public class Collaboration extends MembershipContainer implements ICollaboration
{
try
{
- new MessageNotification(receiver.getSession().getChannel(), collaborationID, facilityType, message).send();
+ SignalProtocol protocol = receiver.getSession().getProtocol();
+ new MessageNotification(protocol, collaborationID, facilityType, message).send();
}
catch (Exception ex)
{
diff --git a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/BuddyStateNotification.java b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/BuddyStateNotification.java
index 2d755ae66b..4065f7e244 100644
--- a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/BuddyStateNotification.java
+++ b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/BuddyStateNotification.java
@@ -11,8 +11,8 @@
package org.eclipse.net4j.buddies.internal.common.protocol;
import org.eclipse.net4j.buddies.common.IBuddy.State;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.signal.Request;
+import org.eclipse.net4j.signal.SignalProtocol;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
import java.io.IOException;
@@ -26,9 +26,9 @@ public class BuddyStateNotification extends Request
private State state;
- public BuddyStateNotification(IChannel channel, String userID, State state)
+ public BuddyStateNotification(SignalProtocol protocol, String userID, State state)
{
- super(channel);
+ super(protocol);
this.userID = userID;
this.state = state;
}
diff --git a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/CollaborationLeftNotification.java b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/CollaborationLeftNotification.java
index 5a70267057..67cf2c2cd2 100644
--- a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/CollaborationLeftNotification.java
+++ b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/CollaborationLeftNotification.java
@@ -10,8 +10,8 @@
**************************************************************************/
package org.eclipse.net4j.buddies.internal.common.protocol;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.signal.Request;
+import org.eclipse.net4j.signal.SignalProtocol;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
import java.io.IOException;
@@ -25,9 +25,9 @@ public class CollaborationLeftNotification extends Request
private String userID;
- public CollaborationLeftNotification(IChannel channel, long collaborationID, String userID)
+ public CollaborationLeftNotification(SignalProtocol protocol, long collaborationID, String userID)
{
- super(channel);
+ super(protocol);
this.collaborationID = collaborationID;
this.userID = userID;
}
diff --git a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/MessageNotification.java b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/MessageNotification.java
index 7de369b755..2182ae2dae 100644
--- a/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/MessageNotification.java
+++ b/plugins/org.eclipse.net4j.buddies.common/src/org/eclipse/net4j/buddies/internal/common/protocol/MessageNotification.java
@@ -11,8 +11,8 @@
package org.eclipse.net4j.buddies.internal.common.protocol;
import org.eclipse.net4j.buddies.common.IMessage;
-import org.eclipse.net4j.channel.IChannel;
import org.eclipse.net4j.signal.Request;
+import org.eclipse.net4j.signal.SignalProtocol;
import org.eclipse.net4j.util.io.ExtendedDataOutputStream;
import java.io.IOException;
@@ -28,9 +28,9 @@ public class MessageNotification extends Request
private IMessage message;
- public MessageNotification(IChannel channel, long collaborationID, String facilityType, IMessage message)
+ public MessageNotification(SignalProtocol protocol, long collaborationID, String facilityType, IMessage message)
{
- super(channel);
+ super(protocol);
this.collaborationID = collaborationID;
this.facilityType = facilityType;
this.message = message;

Back to the top