summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-10-09 10:39:46 (EDT)
committerEike Stepper2007-10-09 10:39:46 (EDT)
commitea0803faabffe5c8f88cfc2f32e4243b6f906fe8 (patch)
tree732ba230e66f861c10a27d310791dec53e19081e
parentbddc8121db3db1c71e78949bc39468f4a39ad951 (diff)
downloadcdo-ea0803faabffe5c8f88cfc2f32e4243b6f906fe8.zip
cdo-ea0803faabffe5c8f88cfc2f32e4243b6f906fe8.tar.gz
cdo-ea0803faabffe5c8f88cfc2f32e4243b6f906fe8.tar.bz2
[205668] Provide buddies example
https://bugs.eclipse.org/bugs/show_bug.cgi?id=205668
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/BuddyCollaboration.java3
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/Self.java3
2 files changed, 4 insertions, 2 deletions
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/BuddyCollaboration.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/BuddyCollaboration.java
index 9918d31..a76b3c2 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/BuddyCollaboration.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/BuddyCollaboration.java
@@ -15,6 +15,7 @@ import org.eclipse.net4j.buddies.IBuddySession;
import org.eclipse.net4j.buddies.internal.protocol.Collaboration;
import org.eclipse.net4j.buddies.internal.protocol.Message;
import org.eclipse.net4j.buddies.internal.protocol.MessageNotification;
+import org.eclipse.net4j.buddies.internal.protocol.ProtocolConstants;
import org.eclipse.net4j.buddies.protocol.IBuddy;
import org.eclipse.net4j.buddies.protocol.IFacility;
import org.eclipse.net4j.buddies.protocol.IMessage;
@@ -49,7 +50,7 @@ public class BuddyCollaboration extends Collaboration implements IBuddyCollabora
{
String description = String.valueOf(getID());
IFacility facility = (IFacility)IPluginContainer.INSTANCE.getElement(FACILITY_GROUP, type, description);
- boolean success = new InstallFacilityRequest(session.getChannel(), getID(), type).send(5000L);
+ boolean success = new InstallFacilityRequest(session.getChannel(), getID(), type).send(ProtocolConstants.TIMEOUT);
if (success)
{
addFacility(facility);
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/Self.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/Self.java
index b1ed367..178fd66 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/Self.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/Self.java
@@ -11,6 +11,7 @@
package org.eclipse.net4j.internal.buddies;
import org.eclipse.net4j.buddies.internal.protocol.Buddy;
+import org.eclipse.net4j.buddies.internal.protocol.ProtocolConstants;
import org.eclipse.net4j.buddies.protocol.IAccount;
import org.eclipse.net4j.buddies.protocol.IBuddy;
import org.eclipse.net4j.buddies.protocol.ICollaboration;
@@ -53,7 +54,7 @@ public class Self extends Buddy
{
try
{
- long id = new InitiateCollaborationRequest(getSession().getChannel(), buddies).send(5000L);
+ long id = new InitiateCollaborationRequest(getSession().getChannel(), buddies).send(ProtocolConstants.TIMEOUT);
BuddyCollaboration collaboration = new BuddyCollaboration(id, buddies);
LifecycleUtil.activate(collaboration);
addCollaboration(collaboration);