Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2009-12-29 10:06:48 -0500
committerslewis2009-12-29 10:06:48 -0500
commit4ef771c524524117314d30bb4514d6716b174ee3 (patch)
tree0484d71f109c8a68b8519e9837a2760d9e329a07 /providers/bundles/org.eclipse.ecf.provider.xmpp
parent39dea48cd293744cc301d2aad0b577ca28fca410 (diff)
downloadorg.eclipse.ecf-4ef771c524524117314d30bb4514d6716b174ee3.tar.gz
org.eclipse.ecf-4ef771c524524117314d30bb4514d6716b174ee3.tar.xz
org.eclipse.ecf-4ef771c524524117314d30bb4514d6716b174ee3.zip
Added methods to xmpp, jgroups, and activemq providers to support osgi 4.2 remote services
Diffstat (limited to 'providers/bundles/org.eclipse.ecf.provider.xmpp')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/internal/provider/xmpp/XMPPContainerInstantiator.java36
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/internal/provider/xmpp/XMPPSContainerInstantiator.java26
2 files changed, 53 insertions, 9 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/internal/provider/xmpp/XMPPContainerInstantiator.java b/providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/internal/provider/xmpp/XMPPContainerInstantiator.java
index 757ee7b37..868448471 100644
--- a/providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/internal/provider/xmpp/XMPPContainerInstantiator.java
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/internal/provider/xmpp/XMPPContainerInstantiator.java
@@ -8,7 +8,12 @@
******************************************************************************/
package org.eclipse.ecf.internal.provider.xmpp;
-import org.eclipse.ecf.core.*;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.eclipse.ecf.core.ContainerCreateException;
+import org.eclipse.ecf.core.ContainerTypeDescription;
+import org.eclipse.ecf.core.IContainer;
import org.eclipse.ecf.provider.generic.GenericContainerInstantiator;
import org.eclipse.ecf.provider.xmpp.XMPPContainer;
@@ -49,11 +54,26 @@ public class XMPPContainerInstantiator extends GenericContainerInstantiator {
"Exception creating generic container", e);
}
}
- /*
- * public String[] getSupportedAdapterTypes( ContainerTypeDescription
- * description) { return new String[] { IChatRoomManager.class.getName(),
- * IPresenceContainerAdapter.class.getName(),
- * ISendFileTransferContainerAdapter.class.getName(),
- * ISharedObjectContainer.class.getName() }; }
- */
+
+ private static final String XMPP_CONFIG = "ecf.xmpp.smack"; //$NON-NLS-1$
+
+ public String[] getImportedConfigs(ContainerTypeDescription description,
+ String[] exporterSupportedConfigs) {
+ if (exporterSupportedConfigs == null)
+ return null;
+ List results = new ArrayList();
+ List supportedConfigs = Arrays.asList(exporterSupportedConfigs);
+ if (XMPP_CONFIG.equals(description.getName())) {
+ if (supportedConfigs.contains(XMPP_CONFIG))
+ results.add(XMPP_CONFIG);
+ }
+ if (supportedConfigs.size() == 0)
+ return null;
+ return (String[]) results.toArray(new String[] {});
+ }
+
+ public String[] getSupportedConfigs(ContainerTypeDescription description) {
+ return new String[] { XMPP_CONFIG };
+ }
+
} \ No newline at end of file
diff --git a/providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/internal/provider/xmpp/XMPPSContainerInstantiator.java b/providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/internal/provider/xmpp/XMPPSContainerInstantiator.java
index 99d610d82..32d7bdc14 100644
--- a/providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/internal/provider/xmpp/XMPPSContainerInstantiator.java
+++ b/providers/bundles/org.eclipse.ecf.provider.xmpp/src/org/eclipse/ecf/internal/provider/xmpp/XMPPSContainerInstantiator.java
@@ -10,8 +10,11 @@
*****************************************************************************/
package org.eclipse.ecf.internal.provider.xmpp;
-import org.eclipse.ecf.core.ContainerTypeDescription;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
import org.eclipse.ecf.core.ContainerCreateException;
+import org.eclipse.ecf.core.ContainerTypeDescription;
import org.eclipse.ecf.core.IContainer;
import org.eclipse.ecf.provider.xmpp.XMPPSContainer;
@@ -51,4 +54,25 @@ public class XMPPSContainerInstantiator extends XMPPContainerInstantiator {
}
}
+ private static final String XMPPS_CONFIG = "ecf.xmpps.smack"; //$NON-NLS-1$
+
+ public String[] getImportedConfigs(ContainerTypeDescription description,
+ String[] exporterSupportedConfigs) {
+ if (exporterSupportedConfigs == null)
+ return null;
+ List results = new ArrayList();
+ List supportedConfigs = Arrays.asList(exporterSupportedConfigs);
+ if (XMPPS_CONFIG.equals(description.getName())) {
+ if (supportedConfigs.contains(XMPPS_CONFIG))
+ results.add(XMPPS_CONFIG);
+ }
+ if (supportedConfigs.size() == 0)
+ return null;
+ return (String[]) results.toArray(new String[] {});
+ }
+
+ public String[] getSupportedConfigs(ContainerTypeDescription description) {
+ return new String[] { XMPPS_CONFIG };
+ }
+
}

Back to the top