Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2014-03-25 23:34:52 +0000
committerslewis2014-03-25 23:34:52 +0000
commitea88e73ed7fcf5ecbe7e7e9e004ced274e530417 (patch)
tree2aed2853889d1b69c4b6c5279cb6bb49a3dedc2b /providers
parent50d163c681295e9559a6acedcc6aec155346cd54 (diff)
downloadorg.eclipse.ecf-ea88e73ed7fcf5ecbe7e7e9e004ced274e530417.tar.gz
org.eclipse.ecf-ea88e73ed7fcf5ecbe7e7e9e004ced274e530417.tar.xz
org.eclipse.ecf-ea88e73ed7fcf5ecbe7e7e9e004ced274e530417.zip
Initial checkin of ssl generic provider java8 remote services support
Diffstat (limited to 'providers')
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/plugin.xml35
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/src/org/eclipse/ecf/provider/internal/remoteservice/java8/J8GenericContainerInstantiator.java2
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/src/org/eclipse/ecf/provider/internal/remoteservice/java8/J8SSLClientSOContainer.java19
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/src/org/eclipse/ecf/provider/internal/remoteservice/java8/J8SSLGenericContainerInstantiator.java67
-rw-r--r--providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/src/org/eclipse/ecf/provider/internal/remoteservice/java8/J8SSLServerSOContainer.java25
5 files changed, 147 insertions, 1 deletions
diff --git a/providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/plugin.xml b/providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/plugin.xml
index 3fa1bdf64..a8e6731fb 100644
--- a/providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/plugin.xml
+++ b/providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/plugin.xml
@@ -20,6 +20,25 @@
name="ecf.generic.client.java8">
</containerFactory>
</extension>
+ <extension
+ point="org.eclipse.ecf.containerFactory">
+ <containerFactory
+ class="org.eclipse.ecf.provider.internal.remoteservice.java8.J8SSLGenericContainerInstantiator"
+ description="ECF Java8 Generic SSL Server"
+ hidden="false"
+ name="ecf.generic.ssl.server.java8"
+ server="true">
+ </containerFactory>
+ </extension>
+ <extension
+ point="org.eclipse.ecf.containerFactory">
+ <containerFactory
+ class="org.eclipse.ecf.provider.internal.remoteservice.java8.J8SSLGenericContainerInstantiator"
+ description="ECF Java8 Generic SSL Client"
+ hidden="true"
+ name="ecf.generic.ssl.client.java8">
+ </containerFactory>
+ </extension>
<extension
point="org.eclipse.core.runtime.adapters">
<factory
@@ -35,6 +54,22 @@
class="org.eclipse.ecf.provider.internal.remoteservice.java8.J8RemoteServiceContainerAdapterFactory">
<adapter type="org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter"/>
</factory>
+ </extension>
+ <extension
+ point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.eclipse.ecf.provider.internal.remoteservice.java8.J8SSLClientSOContainer"
+ class="org.eclipse.ecf.provider.internal.remoteservice.java8.J8RemoteServiceContainerAdapterFactory">
+ <adapter type="org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter"/>
+ </factory>
</extension>
+ <extension
+ point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.eclipse.ecf.provider.internal.remoteservice.java8.J8SSLServerSOContainer"
+ class="org.eclipse.ecf.provider.internal.remoteservice.java8.J8RemoteServiceContainerAdapterFactory">
+ <adapter type="org.eclipse.ecf.remoteservice.IRemoteServiceContainerAdapter"/>
+ </factory>
+ </extension>
</plugin>
diff --git a/providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/src/org/eclipse/ecf/provider/internal/remoteservice/java8/J8GenericContainerInstantiator.java b/providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/src/org/eclipse/ecf/provider/internal/remoteservice/java8/J8GenericContainerInstantiator.java
index 1f6401160..c5644795a 100644
--- a/providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/src/org/eclipse/ecf/provider/internal/remoteservice/java8/J8GenericContainerInstantiator.java
+++ b/providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/src/org/eclipse/ecf/provider/internal/remoteservice/java8/J8GenericContainerInstantiator.java
@@ -56,7 +56,7 @@ public class J8GenericContainerInstantiator extends
// For a client, if exporter is server we can import
// or if remote is either generic server or generic client
} else if (JAVA8_CLIENT_NAME.equals(description.getName())) {
- if (supportedConfigs.contains(JAVA8_SERVER_NAME) || supportedConfigs.contains(TCPCLIENT_NAME))
+ if (supportedConfigs.contains(JAVA8_SERVER_NAME) || supportedConfigs.contains(JAVA8_CLIENT_NAME))
results.add(JAVA8_CLIENT_NAME);
}
if (results.size() == 0)
diff --git a/providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/src/org/eclipse/ecf/provider/internal/remoteservice/java8/J8SSLClientSOContainer.java b/providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/src/org/eclipse/ecf/provider/internal/remoteservice/java8/J8SSLClientSOContainer.java
new file mode 100644
index 000000000..fe82ee5a6
--- /dev/null
+++ b/providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/src/org/eclipse/ecf/provider/internal/remoteservice/java8/J8SSLClientSOContainer.java
@@ -0,0 +1,19 @@
+/*******************************************************************************
+ * Copyright (c) 2014 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.provider.internal.remoteservice.java8;
+
+import org.eclipse.ecf.core.sharedobject.ISharedObjectContainerConfig;
+import org.eclipse.ecf.provider.generic.SSLClientSOContainer;
+
+public class J8SSLClientSOContainer extends SSLClientSOContainer {
+
+ public J8SSLClientSOContainer(ISharedObjectContainerConfig config, int ka) {
+ super(config, ka);
+ }
+} \ No newline at end of file
diff --git a/providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/src/org/eclipse/ecf/provider/internal/remoteservice/java8/J8SSLGenericContainerInstantiator.java b/providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/src/org/eclipse/ecf/provider/internal/remoteservice/java8/J8SSLGenericContainerInstantiator.java
new file mode 100644
index 000000000..da2e1898f
--- /dev/null
+++ b/providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/src/org/eclipse/ecf/provider/internal/remoteservice/java8/J8SSLGenericContainerInstantiator.java
@@ -0,0 +1,67 @@
+/*******************************************************************************
+ * Copyright (c) 2014 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.provider.internal.remoteservice.java8;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import org.eclipse.ecf.core.ContainerTypeDescription;
+import org.eclipse.ecf.core.IContainer;
+import org.eclipse.ecf.provider.generic.SOContainerConfig;
+import org.eclipse.ecf.provider.generic.SSLGenericContainerInstantiator;
+
+public class J8SSLGenericContainerInstantiator extends
+ SSLGenericContainerInstantiator {
+
+ public static final String JAVA8_SSL_CLIENT_NAME = "ecf.generic.ssl.client.java8";
+ public static final String JAVA8_SSL_SERVER_NAME = "ecf.generic.ssl.server.java8";
+
+ @Override
+ protected boolean isClient(ContainerTypeDescription description) {
+ if (description.getName().equals(JAVA8_SSL_SERVER_NAME))
+ return false;
+ return true;
+ }
+
+ @Override
+ protected IContainer createClientContainer(GenericContainerArgs gcargs)
+ throws Exception {
+ return new J8TCPClientSOContainer(new SOContainerConfig(gcargs.getID()), gcargs.getKeepAlive().intValue());
+ }
+
+ @Override
+ protected IContainer createServerContainer(GenericContainerArgs gcargs)
+ throws Exception {
+ return new J8TCPServerSOContainer(new SOContainerConfig(gcargs.getID()), gcargs.getBindAddress(), gcargs.getKeepAlive().intValue());
+ }
+
+ @SuppressWarnings({ "rawtypes", "unchecked" })
+ @Override
+ public String[] getImportedConfigs(ContainerTypeDescription description, String[] exporterSupportedConfigs) {
+ if (exporterSupportedConfigs == null)
+ return null;
+ List results = new ArrayList();
+ List supportedConfigs = Arrays.asList(exporterSupportedConfigs);
+ // For a server, if exporter is a client then we can be an importer
+ if (JAVA8_SSL_SERVER_NAME.equals(description.getName())) {
+ if (supportedConfigs.contains(JAVA8_SSL_CLIENT_NAME))
+ results.add(JAVA8_SSL_SERVER_NAME);
+ // For a client, if exporter is server we can import
+ // or if remote is either generic server or generic client
+ } else if (JAVA8_SSL_CLIENT_NAME.equals(description.getName())) {
+ if (supportedConfigs.contains(JAVA8_SSL_SERVER_NAME) || supportedConfigs.contains(JAVA8_SSL_CLIENT_NAME))
+ results.add(JAVA8_SSL_CLIENT_NAME);
+ }
+ if (results.size() == 0)
+ return null;
+ return (String[]) results.toArray(new String[] {});
+ }
+
+}
diff --git a/providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/src/org/eclipse/ecf/provider/internal/remoteservice/java8/J8SSLServerSOContainer.java b/providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/src/org/eclipse/ecf/provider/internal/remoteservice/java8/J8SSLServerSOContainer.java
new file mode 100644
index 000000000..e3356c6ef
--- /dev/null
+++ b/providers/bundles/org.eclipse.ecf.provider.remoteservice.java8/src/org/eclipse/ecf/provider/internal/remoteservice/java8/J8SSLServerSOContainer.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2014 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.provider.internal.remoteservice.java8;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.URISyntaxException;
+
+import org.eclipse.ecf.core.sharedobject.ISharedObjectContainerConfig;
+import org.eclipse.ecf.provider.generic.SSLServerSOContainer;
+
+public class J8SSLServerSOContainer extends SSLServerSOContainer {
+
+ public J8SSLServerSOContainer(ISharedObjectContainerConfig config,
+ InetAddress bindAddress, int keepAlive) throws IOException,
+ URISyntaxException {
+ super(config, bindAddress, keepAlive);
+ }
+} \ No newline at end of file

Back to the top