Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2013-10-05 06:23:55 +0000
committerslewis2013-10-05 06:23:55 +0000
commit99647ba5058574b0e564505602a20f18f4084979 (patch)
tree0ab3480a271d60206059f12417d7ac5dc6fb44b7 /examples/bundles/com.mycorp.examples.timeservice.host/src
parent7406a01b71db879a6609ffee056ed973ae2308ea (diff)
downloadorg.eclipse.ecf-99647ba5058574b0e564505602a20f18f4084979.tar.gz
org.eclipse.ecf-99647ba5058574b0e564505602a20f18f4084979.tar.xz
org.eclipse.ecf-99647ba5058574b0e564505602a20f18f4084979.zip
Simplified generic provider usage in timeservice host to onl specify
port (rather than entire id).
Diffstat (limited to 'examples/bundles/com.mycorp.examples.timeservice.host/src')
-rw-r--r--examples/bundles/com.mycorp.examples.timeservice.host/src/com/mycorp/examples/timeservice/host/Activator.java20
1 files changed, 10 insertions, 10 deletions
diff --git a/examples/bundles/com.mycorp.examples.timeservice.host/src/com/mycorp/examples/timeservice/host/Activator.java b/examples/bundles/com.mycorp.examples.timeservice.host/src/com/mycorp/examples/timeservice/host/Activator.java
index 8f5438ccb..954866fd2 100644
--- a/examples/bundles/com.mycorp.examples.timeservice.host/src/com/mycorp/examples/timeservice/host/Activator.java
+++ b/examples/bundles/com.mycorp.examples.timeservice.host/src/com/mycorp/examples/timeservice/host/Activator.java
@@ -22,8 +22,8 @@ import com.mycorp.examples.timeservice.ITimeService;
public class Activator implements BundleActivator {
private static final String GENERIC_SERVER_CONFIG = "ecf.generic.server";
- private static final String GENERIC_SERVER_IDPROP_NAME = GENERIC_SERVER_CONFIG+ ".id";
- private static final String GENERIC_SERVER_IDPROP_VALUE = "ecftcp://localhost:3288/server";
+ private static final String GENERIC_SERVER_PORTPROP_NAME = GENERIC_SERVER_CONFIG+ ".port";
+ private static final String GENERIC_SERVER_PORTPROP_VALUE = "3288";
private static final String R_OSGI_SERVER_CONFIG = "ecf.r_osgi.peer";
@@ -65,21 +65,21 @@ public class Activator implements BundleActivator {
// set service.exported.configs
String serviceExportedConfig = System.getProperty("service.exported.configs",GENERIC_SERVER_CONFIG);
props.put("service.exported.configs",serviceExportedConfig);
- String idPropName = null;
- String idPropValue = null;
+ String propName = null;
+ String propValue = null;
if (GENERIC_SERVER_CONFIG.equals(serviceExportedConfig)) {
- idPropName = GENERIC_SERVER_IDPROP_NAME;
- idPropValue = GENERIC_SERVER_IDPROP_VALUE;
+ propName = GENERIC_SERVER_PORTPROP_NAME;
+ propValue = GENERIC_SERVER_PORTPROP_VALUE;
} else if (REST_SERVER_CONFIG.equals(serviceExportedConfig)) {
- idPropName = REST_SERVER_IDPROP_NAME;
- idPropValue = REST_SERVER_IDPROP_VALUE;
+ propName = REST_SERVER_IDPROP_NAME;
+ propValue = REST_SERVER_IDPROP_VALUE;
} else if (R_OSGI_SERVER_CONFIG.equals(serviceExportedConfig)) {
// r-osgi does not require the server to define its endpoint
return props;
} else throw new NullPointerException("Unsuppored value for service.exported.config="+serviceExportedConfig);
- // Set the id propName and idPropValue
- props.put(idPropName,idPropValue);
+ // Set the propName and idPropValue
+ props.put(propName,propValue);
return props;
}

Back to the top