Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2013-01-20 07:15:13 +0000
committerslewis2013-01-20 07:15:13 +0000
commitac7583151929db0c49470ce00f05249c241cc73b (patch)
treed410d25ddf2dd1b71bca591df798184000ccf39f /server-side
parentf2399d2ddcda03d77d2cd308186b171d91465a59 (diff)
parent418ab59b4b8b876ecce7337596c8bf16aba9d7c7 (diff)
downloadorg.eclipse.ecf-ac7583151929db0c49470ce00f05249c241cc73b.tar.gz
org.eclipse.ecf-ac7583151929db0c49470ce00f05249c241cc73b.tar.xz
org.eclipse.ecf-ac7583151929db0c49470ce00f05249c241cc73b.zip
Merge remote-tracking branch 'origin/master'
Conflicts: server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/SSLAbstractGenericServer.java server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/app/SSLGenericClientApplication.java server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/app/SSLGenericClientJavaApplication.java
Diffstat (limited to 'server-side')
-rw-r--r--server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/SSLAbstractGenericServer.java6
-rw-r--r--server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/app/SSLGenericClientApplication.java91
-rw-r--r--server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/app/SSLGenericClientJavaApplication.java43
3 files changed, 3 insertions, 137 deletions
diff --git a/server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/SSLAbstractGenericServer.java b/server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/SSLAbstractGenericServer.java
index 92d439704..224109ad0 100644
--- a/server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/SSLAbstractGenericServer.java
+++ b/server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/SSLAbstractGenericServer.java
@@ -37,7 +37,7 @@ public abstract class SSLAbstractGenericServer {
return getServerContainer(0);
}
- public List /* GenericServerContainer */getServerContainers() {
+ public List /* SSLGenericServerContainer */getServerContainers() {
List result = new ArrayList();
for (Iterator i = serverGroup.elements(); i.hasNext();) {
result.add(i.next());
@@ -80,7 +80,7 @@ public abstract class SSLAbstractGenericServer {
}
protected void createAndInitializeServer(String path) throws IDCreateException {
- createAndInitializeServer(path, TCPServerSOContainer.DEFAULT_KEEPALIVE);
+ createAndInitializeServer(path, SSLServerSOContainer.DEFAULT_KEEPALIVE);
}
protected void createAndInitializeServer(String path, int keepAlive) throws IDCreateException {
@@ -89,7 +89,7 @@ public abstract class SSLAbstractGenericServer {
SSLGenericServerContainer s = new SSLGenericServerContainer(this, createServerConfig(path), serverGroup, path, keepAlive);
IContainerManager containerManager = Activator.getDefault().getContainerManager();
if (containerManager != null) {
- ContainerTypeDescription ctd = containerManager.getContainerFactory().getDescriptionByName("ecf.generic.ssl.server"); //$NON-NLS-1$
+ ContainerTypeDescription ctd = containerManager.getContainerFactory().getDescriptionByName("ecf.generic.server"); //$NON-NLS-1$
containerManager.addContainer(s, ctd);
}
IConnectHandlerPolicy policy = createConnectHandlerPolicy(s, path);
diff --git a/server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/app/SSLGenericClientApplication.java b/server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/app/SSLGenericClientApplication.java
deleted file mode 100644
index 6c3a8db01..000000000
--- a/server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/app/SSLGenericClientApplication.java
+++ /dev/null
@@ -1,91 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2013 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.server.generic.app;
-
-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.SSLClientSOContainer;
-import org.eclipse.equinox.app.IApplication;
-import org.eclipse.equinox.app.IApplicationContext;
-
-/**
- * @since 6.0
- */
-public class SSLGenericClientApplication extends SSLAbstractGenericClientApplication implements IApplication {
-
- private static final String GENERIC_CLIENT_CONTAINER_TYPE = "ecf.generic.ssl.client"; //$NON-NLS-1$
-
- protected final Object appLock = new Object();
- protected boolean done = false;
-
- public Object start(IApplicationContext context) throws Exception {
- String[] args = getArguments(context);
- processArguments(args);
-
- initialize();
-
- connect();
-
- waitForDone();
-
- return IApplication.EXIT_OK;
- }
-
- public void stop() {
- dispose();
- synchronized (appLock) {
- done = true;
- appLock.notifyAll();
- }
- }
-
- protected ISharedObjectContainer createContainer() throws ContainerCreateException {
- IContainerFactory f = Activator.getDefault().getContainerManager().getContainerFactory();
- SSLClientSOContainer client = (SSLClientSOContainer) ((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() {
- // then just wait here
- synchronized (appLock) {
- while (!done) {
- try {
- appLock.wait();
- } catch (InterruptedException e) {
- // do nothing
- }
- }
- }
- }
-
- protected String[] getArguments(IApplicationContext context) {
- return (String[]) context.getArguments().get("application.args"); //$NON-NLS-1$
- }
-
-}
diff --git a/server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/app/SSLGenericClientJavaApplication.java b/server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/app/SSLGenericClientJavaApplication.java
deleted file mode 100644
index 66459b9b8..000000000
--- a/server-side/bundles/org.eclipse.ecf.server.generic/src/org/eclipse/ecf/server/generic/app/SSLGenericClientJavaApplication.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*******************************************************************************
-* Copyright (c) 2013 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.server.generic.app;
-
-import org.eclipse.ecf.core.*;
-import org.eclipse.ecf.core.sharedobject.ISharedObjectContainer;
-import org.eclipse.ecf.provider.generic.SSLGenericContainerInstantiator;
-
-/**
- * @since 6.0
- */
-public class SSLGenericClientJavaApplication extends SSLAbstractGenericClientApplication {
-
- protected ISharedObjectContainer createContainer() throws ContainerCreateException {
- IContainerFactory containerFactory = ContainerFactory.getDefault();
- containerFactory.addDescription(new ContainerTypeDescription("ecf.generic.ssl.client", new SSLGenericContainerInstantiator(), null)); //$NON-NLS-1$
- return (ISharedObjectContainer) containerFactory.createContainer("ecf.generic.ssl.client"); //$NON-NLS-1$
- }
-
- public static void main(String[] args) throws Exception {
- SSLGenericClientJavaApplication app = new SSLGenericClientJavaApplication();
- app.processArguments(args);
- app.initialize();
- app.connect();
- // wait for waitTime
- try {
- synchronized (app) {
- app.wait(app.waitTime);
- }
- } catch (InterruptedException e) {
- // nothing
- }
- app.dispose();
- }
-
-}

Back to the top