Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2007-04-17 13:01:55 -0400
committerslewis2007-04-17 13:01:55 -0400
commit4a4fb3885ff89e1697a8dbf43bc90cb12bf45bff (patch)
treece16ad63b64287b967bbf16aefd403c30cc39914 /framework/bundles/org.eclipse.ecf.presence
parentcfc95501ff66dafb9f4a01e184bd74fdec98199d (diff)
downloadorg.eclipse.ecf-4a4fb3885ff89e1697a8dbf43bc90cb12bf45bff.tar.gz
org.eclipse.ecf-4a4fb3885ff89e1697a8dbf43bc90cb12bf45bff.tar.xz
org.eclipse.ecf-4a4fb3885ff89e1697a8dbf43bc90cb12bf45bff.zip
Simplified presence API and changed existing impls to match
Diffstat (limited to 'framework/bundles/org.eclipse.ecf.presence')
-rw-r--r--framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/IParticipantListener.java54
-rw-r--r--framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/IPresenceListener.java16
-rw-r--r--framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/chatroom/IChatRoomParticipantListener.java18
3 files changed, 31 insertions, 57 deletions
diff --git a/framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/IParticipantListener.java b/framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/IParticipantListener.java
deleted file mode 100644
index fade38045..000000000
--- a/framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/IParticipantListener.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/****************************************************************************
- * Copyright (c) 2004 Composent, Inc. and others.
- * 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:
- * Composent, Inc. - initial API and implementation
- *****************************************************************************/
-package org.eclipse.ecf.presence;
-
-import org.eclipse.ecf.core.identity.ID;
-
-/**
- * Super interface receiving participant presence messages.
- * <p>
- * </p>
- * Note these methods will be called asynchronously when notifications of remote
- * changes are received by the provider implementation code. The provider is
- * free to call the methods below with an arbitrary thread, so the
- * implementation of these methods must be appropriately prepared.
- * <p>
- * </p>
- * For example, if the code implementing any of these methods must interact with
- * user interface code, then it should use code such as the following to execute
- * on the SWT UI thread:
- *
- * <pre>
- * Display.getDefault().asyncExec(new Runnable() {
- * public void run() {
- * ... UI code here
- * }
- * });
- * </pre>
- *
- * Further, the code in the implementations of these methods should <b>not block</b> via
- * I/O operations or blocking UI calls.
- *
- */
-public interface IParticipantListener {
-
- /**
- * Notification that a presence update has been received
- *
- * @param fromID
- * the ID of the sender of the presence update. Will not be
- * <code>null</code>.
- * @param presence
- * the presence information for the sender. Will not be
- * <code>null</code>.
- */
- public void handlePresence(ID fromID, IPresence presence);
-}
diff --git a/framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/IPresenceListener.java b/framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/IPresenceListener.java
index a9c18c300..74d784503 100644
--- a/framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/IPresenceListener.java
+++ b/framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/IPresenceListener.java
@@ -11,6 +11,8 @@
package org.eclipse.ecf.presence;
+import org.eclipse.ecf.core.identity.ID;
+
/**
* Listener for user presence changes.
* <p></p>
@@ -35,6 +37,18 @@ package org.eclipse.ecf.presence;
* Further, the code in the implementations of these methods should <b>not block</b> via
* I/O operations or blocking UI calls.
*/
-public interface IPresenceListener extends IParticipantListener {
+public interface IPresenceListener {
+
+ /**
+ * Notification that a presence update has been received
+ *
+ * @param fromID
+ * the ID of the sender of the presence update. Will not be
+ * <code>null</code>.
+ * @param presence
+ * the presence information for the sender. Will not be
+ * <code>null</code>.
+ */
+ public void handlePresence(ID fromID, IPresence presence);
}
diff --git a/framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/chatroom/IChatRoomParticipantListener.java b/framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/chatroom/IChatRoomParticipantListener.java
index ffc8d27ca..bfb396668 100644
--- a/framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/chatroom/IChatRoomParticipantListener.java
+++ b/framework/bundles/org.eclipse.ecf.presence/src/org/eclipse/ecf/presence/chatroom/IChatRoomParticipantListener.java
@@ -10,8 +10,9 @@
*****************************************************************************/
package org.eclipse.ecf.presence.chatroom;
+import org.eclipse.ecf.core.identity.ID;
import org.eclipse.ecf.core.user.IUser;
-import org.eclipse.ecf.presence.IParticipantListener;
+import org.eclipse.ecf.presence.IPresence;
/**
* Listener interface for receiving participant arrive and departed
@@ -40,7 +41,7 @@ import org.eclipse.ecf.presence.IParticipantListener;
* Further, the code in the implementations of these methods should <b>not block</b> via
* I/O operations or blocking UI calls.
*/
-public interface IChatRoomParticipantListener extends IParticipantListener {
+public interface IChatRoomParticipantListener {
/**
* Notification that participant arrived in associated chat room
*
@@ -74,4 +75,17 @@ public interface IChatRoomParticipantListener extends IParticipantListener {
* participant
*/
public void handleDeparted(IUser participant);
+
+ /**
+ * Notification that a presence update has been received
+ *
+ * @param fromID
+ * the ID of the sender of the presence update. Will not be
+ * <code>null</code>.
+ * @param presence
+ * the presence information for the sender. Will not be
+ * <code>null</code>.
+ */
+ public void handlePresenceUpdated(ID fromID, IPresence presence);
+
}

Back to the top