Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2014-03-24 16:20:22 +0000
committerslewis2014-03-24 16:20:22 +0000
commitc1107a6bb5f98c26d4d141f42fb7f9b12d4d3d37 (patch)
tree2651debb5162941a8e3d3d0b93a1ca2429563035
parentbd48bc6447c7d6a51e5331db8f54807ea42995f5 (diff)
downloadorg.eclipse.ecf-c1107a6bb5f98c26d4d141f42fb7f9b12d4d3d37.tar.gz
org.eclipse.ecf-c1107a6bb5f98c26d4d141f42fb7f9b12d4d3d37.tar.xz
org.eclipse.ecf-c1107a6bb5f98c26d4d141f42fb7f9b12d4d3d37.zip
Further generalizations for
https://bugs.eclipse.org/bugs/show_bug.cgi?id=430963 Change-Id: I7e0f96941f3af6596b97ff345564f5880e111a92
-rw-r--r--framework/bundles/org.eclipse.ecf.provider/META-INF/MANIFEST.MF2
-rw-r--r--framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/GenericContainerInstantiator.java23
2 files changed, 21 insertions, 4 deletions
diff --git a/framework/bundles/org.eclipse.ecf.provider/META-INF/MANIFEST.MF b/framework/bundles/org.eclipse.ecf.provider/META-INF/MANIFEST.MF
index bac5d5780..1165db1be 100644
--- a/framework/bundles/org.eclipse.ecf.provider/META-INF/MANIFEST.MF
+++ b/framework/bundles/org.eclipse.ecf.provider/META-INF/MANIFEST.MF
@@ -1,6 +1,6 @@
Manifest-Version: 1.0
Bundle-SymbolicName: org.eclipse.ecf.provider;singleton:=true
-Bundle-Version: 4.4.0.qualifier
+Bundle-Version: 4.5.0.qualifier
Bundle-Name: %plugin.name
Bundle-Vendor: %plugin.provider
Bundle-Activator: org.eclipse.ecf.internal.provider.ProviderPlugin
diff --git a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/GenericContainerInstantiator.java b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/GenericContainerInstantiator.java
index 0ffd749a3..429b4b3c3 100644
--- a/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/GenericContainerInstantiator.java
+++ b/framework/bundles/org.eclipse.ecf.provider/src/org/eclipse/ecf/provider/generic/GenericContainerInstantiator.java
@@ -107,7 +107,10 @@ public class GenericContainerInstantiator implements IContainerInstantiator, IRe
return keepAlive;
}
- InetAddress getBindAddress() {
+ /**
+ * @since 4.5
+ */
+ public InetAddress getBindAddress() {
return bindAddress;
}
}
@@ -265,19 +268,33 @@ public class GenericContainerInstantiator implements IContainerInstantiator, IRe
return port;
}
+ /**
+ * @since 4.5
+ */
+ protected IContainer createClientContainer(GenericContainerArgs gcargs) throws Exception {
+ return new TCPClientSOContainer(new SOContainerConfig(gcargs.getID()), gcargs.getKeepAlive().intValue());
+ }
+
+ /**
+ * @since 4.5
+ */
+ protected IContainer createServerContainer(GenericContainerArgs gcargs) throws Exception {
+ return new TCPServerSOContainer(new SOContainerConfig(gcargs.getID()), gcargs.getBindAddress(), gcargs.getKeepAlive().intValue());
+ }
+
public IContainer createInstance(ContainerTypeDescription description, Object[] args) throws ContainerCreateException {
boolean isClient = isClient(description);
try {
GenericContainerArgs gcargs = null;
if (isClient) {
gcargs = getClientArgs(args);
- return new TCPClientSOContainer(new SOContainerConfig(gcargs.getID()), gcargs.getKeepAlive().intValue());
+ return createClientContainer(gcargs);
}
// This synchronized block is to prevent issues with
// multithreaded access to ServerPort (to find available port)
synchronized (this) {
gcargs = getServerArgs(args);
- return new TCPServerSOContainer(new SOContainerConfig(gcargs.getID()), gcargs.getBindAddress(), gcargs.getKeepAlive().intValue());
+ return createServerContainer(gcargs);
}
} catch (Exception e) {
Trace.catching(ProviderPlugin.PLUGIN_ID, ECFProviderDebugOptions.EXCEPTIONS_CATCHING, this.getClass(), "createInstance", e); //$NON-NLS-1$

Back to the top