summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-10-08 05:16:08 (EDT)
committerEike Stepper2007-10-08 05:16:08 (EDT)
commit2caffb9b531d22a32bf72be197d9616f9b8057f0 (patch)
tree1248ddaf8aeeb1207ebf189968dc722279fc7fda
parentc07cb7756aff9fe29b3ed8b6b7662981b6dcca99 (diff)
downloadcdo-2caffb9b531d22a32bf72be197d9616f9b8057f0.zip
cdo-2caffb9b531d22a32bf72be197d9616f9b8057f0.tar.gz
cdo-2caffb9b531d22a32bf72be197d9616f9b8057f0.tar.bz2
[205668] Provide buddies example
https://bugs.eclipse.org/bugs/show_bug.cgi?id=205668
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddiesServerProtocol.java6
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/buddies/BuddiesUtil.java4
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocol.java8
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocolFactory.java4
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyAddedIndication.java4
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyRemovedIndication.java4
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/LoadAccountRequest.java8
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/OpenSessionRequest.java8
8 files changed, 23 insertions, 23 deletions
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddiesServerProtocol.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddiesServerProtocol.java
index 5453051..d5939d3 100644
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddiesServerProtocol.java
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/BuddiesServerProtocol.java
@@ -10,7 +10,7 @@
**************************************************************************/
package org.eclipse.net4j.buddies.internal.server.protocol;
-import org.eclipse.net4j.buddies.protocol.BuddiesProtocolConstants;
+import org.eclipse.net4j.buddies.protocol.ProtocolConstants;
import org.eclipse.net4j.signal.SignalProtocol;
import org.eclipse.net4j.signal.SignalReactor;
@@ -25,7 +25,7 @@ public class BuddiesServerProtocol extends SignalProtocol
public String getType()
{
- return BuddiesProtocolConstants.PROTOCOL_NAME;
+ return ProtocolConstants.PROTOCOL_NAME;
}
@Override
@@ -33,7 +33,7 @@ public class BuddiesServerProtocol extends SignalProtocol
{
switch (signalID)
{
- case BuddiesProtocolConstants.SIGNAL_OPEN_SESSION:
+ case ProtocolConstants.SIGNAL_OPEN_SESSION:
return new OpenSessionIndication();
}
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/buddies/BuddiesUtil.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/buddies/BuddiesUtil.java
index b2474c5..dfa11d5 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/buddies/BuddiesUtil.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/buddies/BuddiesUtil.java
@@ -12,7 +12,7 @@ package org.eclipse.net4j.buddies;
import org.eclipse.net4j.IChannel;
import org.eclipse.net4j.IConnector;
-import org.eclipse.net4j.buddies.protocol.BuddiesProtocolConstants;
+import org.eclipse.net4j.buddies.protocol.ProtocolConstants;
import org.eclipse.net4j.internal.buddies.protocol.OpenSessionRequest;
import org.eclipse.net4j.signal.SignalActor;
import org.eclipse.net4j.util.WrappedException;
@@ -30,7 +30,7 @@ public final class BuddiesUtil
{
try
{
- IChannel channel = connector.openChannel(BuddiesProtocolConstants.PROTOCOL_NAME, null);
+ IChannel channel = connector.openChannel(ProtocolConstants.PROTOCOL_NAME, null);
OpenSessionRequest request = new OpenSessionRequest(channel, userID, password);
return request.send(timeout);
}
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocol.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocol.java
index 71c8158..91296c4 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocol.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocol.java
@@ -10,7 +10,7 @@
**************************************************************************/
package org.eclipse.net4j.internal.buddies.protocol;
-import org.eclipse.net4j.buddies.protocol.BuddiesProtocolConstants;
+import org.eclipse.net4j.buddies.protocol.ProtocolConstants;
import org.eclipse.net4j.signal.SignalProtocol;
import org.eclipse.net4j.signal.SignalReactor;
@@ -26,7 +26,7 @@ public class BuddiesClientProtocol extends SignalProtocol
public String getType()
{
- return BuddiesProtocolConstants.PROTOCOL_NAME;
+ return ProtocolConstants.PROTOCOL_NAME;
}
@Override
@@ -34,10 +34,10 @@ public class BuddiesClientProtocol extends SignalProtocol
{
switch (signalID)
{
- case BuddiesProtocolConstants.SIGNAL_BUDDY_ADDED:
+ case ProtocolConstants.SIGNAL_BUDDY_ADDED:
return new BuddyAddedIndication();
- case BuddiesProtocolConstants.SIGNAL_BUDDY_REMOVED:
+ case ProtocolConstants.SIGNAL_BUDDY_REMOVED:
return new BuddyRemovedIndication();
}
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocolFactory.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocolFactory.java
index 59934a0..e92eb43 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocolFactory.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddiesClientProtocolFactory.java
@@ -1,6 +1,6 @@
package org.eclipse.net4j.internal.buddies.protocol;
-import org.eclipse.net4j.buddies.protocol.BuddiesProtocolConstants;
+import org.eclipse.net4j.buddies.protocol.ProtocolConstants;
import org.eclipse.net4j.util.container.IManagedContainer;
@@ -11,7 +11,7 @@ import org.eclipse.internal.net4j.ClientProtocolFactory;
*/
public final class BuddiesClientProtocolFactory extends ClientProtocolFactory
{
- public static final String TYPE = BuddiesProtocolConstants.PROTOCOL_NAME;
+ public static final String TYPE = ProtocolConstants.PROTOCOL_NAME;
public BuddiesClientProtocolFactory()
{
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyAddedIndication.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyAddedIndication.java
index de7761f..b96b82c 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyAddedIndication.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyAddedIndication.java
@@ -10,7 +10,7 @@
**************************************************************************/
package org.eclipse.net4j.internal.buddies.protocol;
-import org.eclipse.net4j.buddies.protocol.BuddiesProtocolConstants;
+import org.eclipse.net4j.buddies.protocol.ProtocolConstants;
import org.eclipse.net4j.internal.buddies.BuddySession;
import org.eclipse.net4j.signal.Indication;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
@@ -29,7 +29,7 @@ public class BuddyAddedIndication extends Indication
@Override
protected short getSignalID()
{
- return BuddiesProtocolConstants.SIGNAL_BUDDY_ADDED;
+ return ProtocolConstants.SIGNAL_BUDDY_ADDED;
}
@Override
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyRemovedIndication.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyRemovedIndication.java
index bc28bb6..edc1bf7 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyRemovedIndication.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyRemovedIndication.java
@@ -10,7 +10,7 @@
**************************************************************************/
package org.eclipse.net4j.internal.buddies.protocol;
-import org.eclipse.net4j.buddies.protocol.BuddiesProtocolConstants;
+import org.eclipse.net4j.buddies.protocol.ProtocolConstants;
import org.eclipse.net4j.internal.buddies.BuddySession;
import org.eclipse.net4j.signal.Indication;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
@@ -29,7 +29,7 @@ public class BuddyRemovedIndication extends Indication
@Override
protected short getSignalID()
{
- return BuddiesProtocolConstants.SIGNAL_BUDDY_REMOVED;
+ return ProtocolConstants.SIGNAL_BUDDY_REMOVED;
}
@Override
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/LoadAccountRequest.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/LoadAccountRequest.java
index 8d00b13..e1f2b25 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/LoadAccountRequest.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/LoadAccountRequest.java
@@ -11,8 +11,8 @@
package org.eclipse.net4j.internal.buddies.protocol;
import org.eclipse.net4j.IChannel;
-import org.eclipse.net4j.buddies.protocol.AccountUtil;
-import org.eclipse.net4j.buddies.protocol.BuddiesProtocolConstants;
+import org.eclipse.net4j.buddies.protocol.ProtocolUtil;
+import org.eclipse.net4j.buddies.protocol.ProtocolConstants;
import org.eclipse.net4j.buddies.protocol.IBuddyAccount;
import org.eclipse.net4j.signal.RequestWithConfirmation;
import org.eclipse.net4j.util.io.ExtendedDataInputStream;
@@ -36,7 +36,7 @@ public class LoadAccountRequest extends RequestWithConfirmation<IBuddyAccount>
@Override
protected short getSignalID()
{
- return BuddiesProtocolConstants.SIGNAL_LOAD_ACCOUNT;
+ return ProtocolConstants.SIGNAL_LOAD_ACCOUNT;
}
@Override
@@ -48,6 +48,6 @@ public class LoadAccountRequest extends RequestWithConfirmation<IBuddyAccount>
@Override
protected IBuddyAccount confirming(ExtendedDataInputStream in) throws IOException
{
- return AccountUtil.readAccount(in);
+ return ProtocolUtil.readAccount(in);
}
}
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/OpenSessionRequest.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/OpenSessionRequest.java
index 8070b4b..f0d925e 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/OpenSessionRequest.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/OpenSessionRequest.java
@@ -12,8 +12,8 @@ package org.eclipse.net4j.internal.buddies.protocol;
import org.eclipse.net4j.IChannel;
import org.eclipse.net4j.buddies.IBuddySession;
-import org.eclipse.net4j.buddies.protocol.AccountUtil;
-import org.eclipse.net4j.buddies.protocol.BuddiesProtocolConstants;
+import org.eclipse.net4j.buddies.protocol.ProtocolUtil;
+import org.eclipse.net4j.buddies.protocol.ProtocolConstants;
import org.eclipse.net4j.buddies.protocol.IBuddyAccount;
import org.eclipse.net4j.internal.buddies.BuddySession;
import org.eclipse.net4j.signal.RequestWithConfirmation;
@@ -42,7 +42,7 @@ public class OpenSessionRequest extends RequestWithConfirmation<IBuddySession>
@Override
protected short getSignalID()
{
- return BuddiesProtocolConstants.SIGNAL_OPEN_SESSION;
+ return ProtocolConstants.SIGNAL_OPEN_SESSION;
}
@Override
@@ -55,7 +55,7 @@ public class OpenSessionRequest extends RequestWithConfirmation<IBuddySession>
@Override
protected IBuddySession confirming(ExtendedDataInputStream in) throws IOException
{
- IBuddyAccount account = AccountUtil.readAccount(in);
+ IBuddyAccount account = ProtocolUtil.readAccount(in);
if (account == null)
{
return null;