summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-10-11 12:01:24 (EDT)
committerEike Stepper2007-10-11 12:01:24 (EDT)
commit2a833c138063a98bd5ad513c954fc1615e225bc1 (patch)
tree3126706158ddfb21dce10cd390f5ef378a6e6779
parent69c598120dbab63adb5974e1bafe8e4ac2cc6d75 (diff)
downloadcdo-2a833c138063a98bd5ad513c954fc1615e225bc1.zip
cdo-2a833c138063a98bd5ad513c954fc1615e225bc1.tar.gz
cdo-2a833c138063a98bd5ad513c954fc1615e225bc1.tar.bz2
[205668] Provide buddies example
https://bugs.eclipse.org/bugs/show_bug.cgi?id=205668
-rw-r--r--features/org.eclipse.net4j.examples-feature/feature.xml7
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/BuddyAdmin.java1
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/ServerFacility.java51
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/ServerFacilityFactory.java26
-rw-r--r--plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/InstallFacilityIndication.java2
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/buddies/BuddiesUtil.java2
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/BuddyCollaboration.java1
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/ClientFacilityFactory.java26
8 files changed, 4 insertions, 112 deletions
diff --git a/features/org.eclipse.net4j.examples-feature/feature.xml b/features/org.eclipse.net4j.examples-feature/feature.xml
index 8083bcf..38af0fb 100644
--- a/features/org.eclipse.net4j.examples-feature/feature.xml
+++ b/features/org.eclipse.net4j.examples-feature/feature.xml
@@ -77,13 +77,6 @@
unpack="false"/>
<plugin
- id="org.eclipse.net4j.chat.server"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
id="org.eclipse.net4j.chat"
download-size="0"
install-size="0"
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/BuddyAdmin.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/BuddyAdmin.java
index d5f36b5..c216b8b 100644
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/BuddyAdmin.java
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/BuddyAdmin.java
@@ -16,6 +16,7 @@ import org.eclipse.net4j.buddies.internal.protocol.Account;
import org.eclipse.net4j.buddies.internal.protocol.BuddyStateNotification;
import org.eclipse.net4j.buddies.internal.protocol.Collaboration;
import org.eclipse.net4j.buddies.internal.protocol.CollaborationContainer;
+import org.eclipse.net4j.buddies.internal.protocol.ServerFacilityFactory;
import org.eclipse.net4j.buddies.internal.server.bundle.OM;
import org.eclipse.net4j.buddies.internal.server.protocol.BuddyRemovedNotification;
import org.eclipse.net4j.buddies.internal.server.protocol.CollaborationInitiatedNotification;
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/ServerFacility.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/ServerFacility.java
deleted file mode 100644
index 5611969..0000000
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/ServerFacility.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2007 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.buddies.internal.server;
-
-import org.eclipse.net4j.IChannel;
-import org.eclipse.net4j.buddies.internal.protocol.Facility;
-import org.eclipse.net4j.buddies.internal.protocol.MessageNotification;
-import org.eclipse.net4j.buddies.internal.server.bundle.OM;
-import org.eclipse.net4j.buddies.protocol.IBuddy;
-import org.eclipse.net4j.buddies.protocol.ICollaboration;
-import org.eclipse.net4j.buddies.protocol.IMessage;
-import org.eclipse.net4j.util.ObjectUtil;
-
-/**
- * @author Eike Stepper
- */
-public class ServerFacility extends Facility
-{
- public ServerFacility(String type)
- {
- super(type);
- }
-
- public void handleMessage(IMessage message)
- {
- ICollaboration collaboration = getCollaboration();
- for (IBuddy buddy : collaboration.getElements())
- {
- if (!ObjectUtil.equals(buddy.getUserID(), message.getSenderID()))
- {
- try
- {
- IChannel channel = buddy.getSession().getChannel();
- new MessageNotification(channel, message).send();
- }
- catch (Exception ex)
- {
- OM.LOG.error(ex);
- }
- }
- }
- }
-}
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/ServerFacilityFactory.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/ServerFacilityFactory.java
deleted file mode 100644
index 7545e11..0000000
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/ServerFacilityFactory.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2007 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.buddies.internal.server;
-
-import org.eclipse.net4j.internal.util.factory.Factory;
-
-/**
- * @author Eike Stepper
- */
-public abstract class ServerFacilityFactory extends Factory
-{
- public static final String PRODUCT_GROUP = "org.eclipse.net4j.buddies.serverFacilities";
-
- public ServerFacilityFactory(String type)
- {
- super(PRODUCT_GROUP, type);
- }
-}
diff --git a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/InstallFacilityIndication.java b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/InstallFacilityIndication.java
index 2067374..32162f5 100644
--- a/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/InstallFacilityIndication.java
+++ b/plugins/org.eclipse.net4j.buddies.server/src/org/eclipse/net4j/buddies/internal/server/protocol/InstallFacilityIndication.java
@@ -12,8 +12,8 @@ package org.eclipse.net4j.buddies.internal.server.protocol;
import org.eclipse.net4j.buddies.internal.protocol.Collaboration;
import org.eclipse.net4j.buddies.internal.protocol.ProtocolConstants;
+import org.eclipse.net4j.buddies.internal.protocol.ServerFacilityFactory;
import org.eclipse.net4j.buddies.internal.server.BuddyAdmin;
-import org.eclipse.net4j.buddies.internal.server.ServerFacilityFactory;
import org.eclipse.net4j.buddies.internal.server.bundle.OM;
import org.eclipse.net4j.buddies.protocol.IFacility;
import org.eclipse.net4j.signal.IndicationWithResponse;
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 ea5eb14..3fac729 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,8 +12,8 @@ package org.eclipse.net4j.buddies;
import org.eclipse.net4j.IChannel;
import org.eclipse.net4j.IConnector;
+import org.eclipse.net4j.buddies.internal.protocol.ClientFacilityFactory;
import org.eclipse.net4j.buddies.internal.protocol.ProtocolConstants;
-import org.eclipse.net4j.internal.buddies.ClientFacilityFactory;
import org.eclipse.net4j.internal.buddies.protocol.OpenSessionRequest;
import org.eclipse.net4j.signal.SignalActor;
import org.eclipse.net4j.util.WrappedException;
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 caaca6e..ba2c6ce 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
@@ -12,6 +12,7 @@ package org.eclipse.net4j.internal.buddies;
import org.eclipse.net4j.buddies.IBuddyCollaboration;
import org.eclipse.net4j.buddies.IBuddySession;
+import org.eclipse.net4j.buddies.internal.protocol.ClientFacilityFactory;
import org.eclipse.net4j.buddies.internal.protocol.Collaboration;
import org.eclipse.net4j.buddies.internal.protocol.Message;
import org.eclipse.net4j.buddies.internal.protocol.MessageNotification;
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/ClientFacilityFactory.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/ClientFacilityFactory.java
deleted file mode 100644
index 2e69bf3..0000000
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/ClientFacilityFactory.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2007 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.internal.buddies;
-
-import org.eclipse.net4j.internal.util.factory.Factory;
-
-/**
- * @author Eike Stepper
- */
-public abstract class ClientFacilityFactory extends Factory
-{
- public static final String PRODUCT_GROUP = "org.eclipse.net4j.buddies.clientFacilities";
-
- public ClientFacilityFactory(String type)
- {
- super(PRODUCT_GROUP, type);
- }
-}