incubator-nuvem-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jo...@apache.org
Subject svn commit: r1098845 - in /incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/common: AbstractPresenceManager.java AbstractXMPPEndPoint.java LoggingMessageListener.java
Date Mon, 02 May 2011 23:08:59 GMT
Author: johnp
Date: Mon May  2 23:08:59 2011
New Revision: 1098845

URL: http://svn.apache.org/viewvc?rev=1098845&view=rev
Log:
organized packages more appropriately to support various xmpp features like messaging, presence
management, pubsub etc

Added:
    incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/common/AbstractPresenceManager.java
Modified:
    incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/common/AbstractXMPPEndPoint.java
    incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/common/LoggingMessageListener.java

Added: incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/common/AbstractPresenceManager.java
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/common/AbstractPresenceManager.java?rev=1098845&view=auto
==============================================================================
--- incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/common/AbstractPresenceManager.java
(added)
+++ incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/common/AbstractPresenceManager.java
Mon May  2 23:08:59 2011
@@ -0,0 +1,45 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.nuvem.cloud.xmpp.common;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.apache.nuvem.cloud.xmpp.api.presence.PresenceListener;
+import org.apache.nuvem.cloud.xmpp.api.presence.PresenceManager;
+
+/**
+ * Holds common code between various cloud platform to avoid duplication.
+ *
+ */
+public abstract class AbstractPresenceManager implements PresenceManager {
+
+	protected List<PresenceListener> listeners = new ArrayList<PresenceListener>();
+
+	public void clearListeners() {
+		listeners.clear();
+	}
+
+	public List<PresenceListener> listeners() {
+		return Collections.unmodifiableList(listeners);
+	}
+
+}

Modified: incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/common/AbstractXMPPEndPoint.java
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/common/AbstractXMPPEndPoint.java?rev=1098845&r1=1098844&r2=1098845&view=diff
==============================================================================
--- incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/common/AbstractXMPPEndPoint.java
(original)
+++ incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/common/AbstractXMPPEndPoint.java
Mon May  2 23:08:59 2011
@@ -24,10 +24,10 @@ import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
 
 import org.apache.nuvem.cloud.xmpp.api.JID;
-import org.apache.nuvem.cloud.xmpp.api.Message;
-import org.apache.nuvem.cloud.xmpp.api.MessageBuilder;
-import org.apache.nuvem.cloud.xmpp.api.MessageListener;
 import org.apache.nuvem.cloud.xmpp.api.Status;
+import org.apache.nuvem.cloud.xmpp.api.message.Message;
+import org.apache.nuvem.cloud.xmpp.api.message.MessageBuilder;
+import org.apache.nuvem.cloud.xmpp.api.message.MessageListener;
 
 /**
  * Encloses the common code for various types of end points irrespective of the
@@ -47,8 +47,7 @@ public abstract class AbstractXMPPEndPoi
 		throw new UnsupportedOperationException("still not implemented");
 	}
 
-	public void registerListner(org.apache.nuvem.cloud.xmpp.api.JID jid,
-			MessageListener listener) {
+	public void registerListner(JID jid, MessageListener listener) {
 		if (listener == null || jid == null)
 			throw new IllegalArgumentException("invalid jid/listener");
 		listeners.put(jid, listener);
@@ -80,7 +79,7 @@ public abstract class AbstractXMPPEndPoi
 	}
 
 	public abstract Status sendMessage(
-			org.apache.nuvem.cloud.xmpp.api.Message message);
+			org.apache.nuvem.cloud.xmpp.api.message.Message message);
 
 	/**
 	 * 

Modified: incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/common/LoggingMessageListener.java
URL: http://svn.apache.org/viewvc/incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/common/LoggingMessageListener.java?rev=1098845&r1=1098844&r2=1098845&view=diff
==============================================================================
--- incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/common/LoggingMessageListener.java
(original)
+++ incubator/nuvem/trunk/nuvem-api/src/main/java/org/apache/nuvem/cloud/xmpp/common/LoggingMessageListener.java
Mon May  2 23:08:59 2011
@@ -21,9 +21,9 @@ package org.apache.nuvem.cloud.xmpp.comm
 
 import java.util.logging.Logger;
 
-import org.apache.nuvem.cloud.xmpp.api.Message;
-import org.apache.nuvem.cloud.xmpp.api.MessageListener;
 import org.apache.nuvem.cloud.xmpp.api.XMPPEndPoint;
+import org.apache.nuvem.cloud.xmpp.api.message.Message;
+import org.apache.nuvem.cloud.xmpp.api.message.MessageListener;
 
 /**
  * Default message listener which will log the message information.



Mime
View raw message