Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim Jongman2011-11-08 17:02:13 +0000
committerWim Jongman2011-11-08 17:02:13 +0000
commitcc15cb492e751cd5421c4faf13439370d06f0936 (patch)
treeceb5c392117f38be99d0016697dac77575a4bde2
parent24c42c92c9bc367225c1d1db4f85b553fca82b89 (diff)
parentf9b8420d30c875bd21aa9198398596d85da62bed (diff)
downloadorg.eclipse.ecf-cc15cb492e751cd5421c4faf13439370d06f0936.tar.gz
org.eclipse.ecf-cc15cb492e751cd5421c4faf13439370d06f0936.tar.xz
org.eclipse.ecf-cc15cb492e751cd5421c4faf13439370d06f0936.zip
-rw-r--r--releng/features/org.eclipse.ecf.core.featurepatch/feature.xml2
-rw-r--r--releng/features/org.eclipse.ecf.core/feature.xml2
-rw-r--r--releng/features/org.eclipse.ecf.remoteservice.sdk.feature/feature.xml2
-rw-r--r--releng/features/org.eclipse.ecf.sdk/feature.xml2
-rw-r--r--server-side/bundles/org.eclipse.ecf.server.generic/META-INF/MANIFEST.MF2
-rw-r--r--server-side/bundles/org.eclipse.ecf.server.generic/launchconfigs/Generic Client Java App.launch23
-rw-r--r--server-side/bundles/org.eclipse.ecf.server.generic/plugin.xml11
-rw-r--r--server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/GenericServerContainerGroup.java9
-rw-r--r--server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/app/AbstractGenericClientApplication.java14
-rw-r--r--server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/app/GenericClientApplication.java38
10 files changed, 76 insertions, 29 deletions
diff --git a/releng/features/org.eclipse.ecf.core.featurepatch/feature.xml b/releng/features/org.eclipse.ecf.core.featurepatch/feature.xml
index 3d82c9ff9..40a279657 100644
--- a/releng/features/org.eclipse.ecf.core.featurepatch/feature.xml
+++ b/releng/features/org.eclipse.ecf.core.featurepatch/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.ecf.core.featurepatch"
label="ECF Filetransfer Patch for Eclipse"
- version="3.5.2.qualifier"
+ version="3.5.3.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/ecf">
diff --git a/releng/features/org.eclipse.ecf.core/feature.xml b/releng/features/org.eclipse.ecf.core/feature.xml
index f6eab30f1..ff965a1e0 100644
--- a/releng/features/org.eclipse.ecf.core/feature.xml
+++ b/releng/features/org.eclipse.ecf.core/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.ecf.core"
label="ECF Target Components for Eclipse"
- version="3.5.2.qualifier"
+ version="3.5.3.qualifier"
provider-name="%providerName"
plugin="org.eclipse.ecf">
diff --git a/releng/features/org.eclipse.ecf.remoteservice.sdk.feature/feature.xml b/releng/features/org.eclipse.ecf.remoteservice.sdk.feature/feature.xml
index 684b1533d..3e0611284 100644
--- a/releng/features/org.eclipse.ecf.remoteservice.sdk.feature/feature.xml
+++ b/releng/features/org.eclipse.ecf.remoteservice.sdk.feature/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.ecf.remoteservice.sdk.feature"
label="ECF Remote Services Target Components"
- version="3.5.2.qualifier"
+ version="3.5.3.qualifier"
provider-name="%providerName">
<description url="http://www.eclipse.org/ecf">
diff --git a/releng/features/org.eclipse.ecf.sdk/feature.xml b/releng/features/org.eclipse.ecf.sdk/feature.xml
index 681913352..063459982 100644
--- a/releng/features/org.eclipse.ecf.sdk/feature.xml
+++ b/releng/features/org.eclipse.ecf.sdk/feature.xml
@@ -2,7 +2,7 @@
<feature
id="org.eclipse.ecf.sdk"
label="ECF Target Components Feature"
- version="3.5.2.qualifier"
+ version="3.5.3.qualifier"
provider-name="Eclipse.org">
<description url="http://www.eclipse.org/ecf">
diff --git a/server-side/bundles/org.eclipse.ecf.server.generic/META-INF/MANIFEST.MF b/server-side/bundles/org.eclipse.ecf.server.generic/META-INF/MANIFEST.MF
index bc826148e..bd9ab0ed8 100644
--- a/server-side/bundles/org.eclipse.ecf.server.generic/META-INF/MANIFEST.MF
+++ b/server-side/bundles/org.eclipse.ecf.server.generic/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin.name
Bundle-SymbolicName: org.eclipse.ecf.server.generic;singleton:=true
-Bundle-Version: 5.0.100.qualifier
+Bundle-Version: 5.1.0.qualifier
Bundle-Activator: org.eclipse.ecf.internal.server.generic.Activator
Bundle-Vendor: %plugin.provider
Bundle-Localization: plugin
diff --git a/server-side/bundles/org.eclipse.ecf.server.generic/launchconfigs/Generic Client Java App.launch b/server-side/bundles/org.eclipse.ecf.server.generic/launchconfigs/Generic Client Java App.launch
index 0d3899612..2f6960d67 100644
--- a/server-side/bundles/org.eclipse.ecf.server.generic/launchconfigs/Generic Client Java App.launch
+++ b/server-side/bundles/org.eclipse.ecf.server.generic/launchconfigs/Generic Client Java App.launch
@@ -1,11 +1,12 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/app/GenericClientJavaApplication.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ecf.server.generic.app.GenericClientJavaApplication"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.ecf.server.generic"/>
-</launchConfiguration>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/app/GenericClientJavaApplication.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.ecf.server.generic.app.GenericClientJavaApplication"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-clientId something:slewis@composent.com/333334"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.ecf.server.generic"/>
+</launchConfiguration>
diff --git a/server-side/bundles/org.eclipse.ecf.server.generic/plugin.xml b/server-side/bundles/org.eclipse.ecf.server.generic/plugin.xml
index 6233371ca..44fa9bc6d 100644
--- a/server-side/bundles/org.eclipse.ecf.server.generic/plugin.xml
+++ b/server-side/bundles/org.eclipse.ecf.server.generic/plugin.xml
@@ -35,5 +35,16 @@
class="org.eclipse.ecf.server.generic.app.GenericClientApplication"/>
</application>
</extension>
+ <extension
+ id="GenericClientApplication"
+ point="org.eclipse.core.runtime.applications">
+ <application
+ thread="any"
+ visible="true">
+ <run
+ class="org.eclipse.ecf.server.generic.app.GenericClientApplication">
+ </run>
+ </application>
+ </extension>
</plugin>
diff --git a/server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/GenericServerContainerGroup.java b/server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/GenericServerContainerGroup.java
index 2d7b2872a..d9ef3b722 100644
--- a/server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/GenericServerContainerGroup.java
+++ b/server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/GenericServerContainerGroup.java
@@ -104,9 +104,16 @@ public class GenericServerContainerGroup implements IGenericServerContainerGroup
return createContainer(path, IGenericServerContainerGroup.DEFAULT_KEEPALIVE);
}
+ /**
+ * @since 5.1
+ */
+ protected GenericServerSOContainerGroup getServerGroup() {
+ return serverGroup;
+ }
+
protected TCPServerSOContainer createGenericServerContainer(String path, int keepAlive, Map properties) throws ContainerCreateException {
try {
- return new TCPServerSOContainer(new SOContainerConfig(createGenericServerID(path, properties), createGenericServerProperties(path, properties)), serverGroup, path, keepAlive);
+ return new TCPServerSOContainer(new SOContainerConfig(createGenericServerID(path, properties), createGenericServerProperties(path, properties)), getServerGroup(), path, keepAlive);
} catch (Exception e) {
throw new ContainerCreateException("Unexpected exception creating generic server container path=" + path, e); //$NON-NLS-1$
}
diff --git a/server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/app/AbstractGenericClientApplication.java b/server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/app/AbstractGenericClientApplication.java
index 9bb89ecf9..7c1ec243e 100644
--- a/server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/app/AbstractGenericClientApplication.java
+++ b/server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/app/AbstractGenericClientApplication.java
@@ -23,6 +23,14 @@ public abstract class AbstractGenericClientApplication {
protected String connectTarget;
protected ISharedObjectContainer clientContainer;
protected int waitTime = 40000;
+ /**
+ * @since 5.1
+ */
+ protected String clientId = null;
+ /**
+ * @since 5.1
+ */
+ protected String password = null;
protected abstract ISharedObjectContainer createContainer() throws ContainerCreateException;
@@ -37,6 +45,12 @@ public abstract class AbstractGenericClientApplication {
waitTime = new Integer(args[i + 1]).intValue();
i++;
}
+ if (args[i].equals("-clientId")) { //$NON-NLS-1$
+ clientId = args[i + 1];
+ }
+ if (args[i].equals("-connectPassword")) { //$NON-NLS-1$
+ password = args[i + 1];
+ }
}
}
diff --git a/server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/app/GenericClientApplication.java b/server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/app/GenericClientApplication.java
index f51b6d392..d14bc8da5 100644
--- a/server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/app/GenericClientApplication.java
+++ b/server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/app/GenericClientApplication.java
@@ -9,11 +9,13 @@
******************************************************************************/
package org.eclipse.ecf.server.generic.app;
-import java.util.ArrayList;
-import java.util.List;
-import org.eclipse.ecf.core.ContainerCreateException;
+import org.eclipse.ecf.core.*;
+import org.eclipse.ecf.core.identity.ID;
+import org.eclipse.ecf.core.security.IConnectContext;
+import org.eclipse.ecf.core.security.IConnectInitiatorPolicy;
import org.eclipse.ecf.core.sharedobject.ISharedObjectContainer;
import org.eclipse.ecf.internal.server.generic.Activator;
+import org.eclipse.ecf.provider.generic.ClientSOContainer;
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
@@ -22,6 +24,8 @@ import org.eclipse.equinox.app.IApplicationContext;
*/
public class GenericClientApplication extends AbstractGenericClientApplication implements IApplication {
+ private static final String GENERIC_CLIENT_CONTAINER_TYPE = "ecf.generic.client"; //$NON-NLS-1$
+
protected final Object appLock = new Object();
protected boolean done = false;
@@ -47,7 +51,24 @@ public class GenericClientApplication extends AbstractGenericClientApplication i
}
protected ISharedObjectContainer createContainer() throws ContainerCreateException {
- return (ISharedObjectContainer) Activator.getDefault().getContainerManager().getContainerFactory().createContainer("ecf.generic.client"); //$NON-NLS-1$
+ IContainerFactory f = Activator.getDefault().getContainerManager().getContainerFactory();
+ ClientSOContainer client = (ClientSOContainer) ((clientId == null) ? f.createContainer(GENERIC_CLIENT_CONTAINER_TYPE) : f.createContainer(GENERIC_CLIENT_CONTAINER_TYPE, clientId));
+ if (password != null) {
+ client.setConnectInitiatorPolicy(new IConnectInitiatorPolicy() {
+ public void refresh() {
+ //nothing
+ }
+
+ public Object createConnectData(IContainer container, ID targetID, IConnectContext context) {
+ return password;
+ }
+
+ public int getConnectTimeout() {
+ return 30000;
+ }
+ });
+ }
+ return client;
}
protected void waitForDone() {
@@ -64,14 +85,7 @@ public class GenericClientApplication extends AbstractGenericClientApplication i
}
protected String[] getArguments(IApplicationContext context) {
- String[] originalArgs = (String[]) context.getArguments().get("application.args"); //$NON-NLS-1$
- if (originalArgs == null)
- return new String[0];
- final List l = new ArrayList();
- for (int i = 0; i < originalArgs.length; i++)
- if (!originalArgs[i].equals("-pdelaunch")) //$NON-NLS-1$
- l.add(originalArgs[i]);
- return (String[]) l.toArray(new String[] {});
+ return (String[]) context.getArguments().get("application.args"); //$NON-NLS-1$
}
}

Back to the top