diff options
author | Mark Spruiell <mes@zeroc.com> | 2002-05-02 03:27:07 +0000 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2002-05-02 03:27:07 +0000 |
commit | 5f342d668a30647b7d7182b4b296e65f7cfc2b07 (patch) | |
tree | 53f13aa7e79a77da4ca6133cf170812d3995d8b2 /java/src/Ice/Util.java | |
parent | adding assertions (diff) | |
download | ice-5f342d668a30647b7d7182b4b296e65f7cfc2b07.tar.bz2 ice-5f342d668a30647b7d7182b4b296e65f7cfc2b07.tar.xz ice-5f342d668a30647b7d7182b4b296e65f7cfc2b07.zip |
align with C++ changes for thread pool, properties, plug-ins
Diffstat (limited to 'java/src/Ice/Util.java')
-rw-r--r-- | java/src/Ice/Util.java | 52 |
1 files changed, 34 insertions, 18 deletions
diff --git a/java/src/Ice/Util.java b/java/src/Ice/Util.java index efae40e3486..c29e3061172 100644 --- a/java/src/Ice/Util.java +++ b/java/src/Ice/Util.java @@ -13,17 +13,17 @@ package Ice; public final class Util { public static Properties - getDefaultProperties(String[] args) + getDefaultProperties() { if (_defaultProperties == null) { - _defaultProperties = createProperties(args); + _defaultProperties = createProperties(); } return _defaultProperties; } public static Properties - getDefaultProperties(StringSeqHolder args) + getDefaultProperties(String[] args) { if (_defaultProperties == null) { @@ -33,51 +33,67 @@ public final class Util } public static Properties - createProperties(String[] args) + getDefaultProperties(StringSeqHolder args) { - return new PropertiesI(args); + if (_defaultProperties == null) + { + _defaultProperties = createProperties(args); + } + return _defaultProperties; } public static Properties - createProperties(StringSeqHolder args) + createProperties() { - return new PropertiesI(args); + return new PropertiesI(); } public static Properties - createPropertiesFromFile(String[] args, String file) + createProperties(String[] args) { - return new PropertiesI(args, file); + return new PropertiesI(args); } public static Properties - createPropertiesFromFile(StringSeqHolder args, String file) + createProperties(StringSeqHolder args) { - return new PropertiesI(args, file); + return new PropertiesI(args); } public static Communicator initialize(String[] args) { - return new CommunicatorI(getDefaultProperties(args)); + StringSeqHolder argsH = new StringSeqHolder(args); + Properties defaultProperties = getDefaultProperties(argsH); + CommunicatorI result = new CommunicatorI(argsH, defaultProperties); + result.finishSetup(argsH); + return result; } public static Communicator initialize(StringSeqHolder args) { - return new CommunicatorI(getDefaultProperties(args)); + Properties defaultProperties = getDefaultProperties(args); + CommunicatorI result = new CommunicatorI(args, defaultProperties); + result.finishSetup(args); + return result; } public static Communicator - initializeWithProperties(Properties properties) + initializeWithProperties(String[] args, Properties properties) { - return new CommunicatorI(properties); + StringSeqHolder argsH = new StringSeqHolder(args); + CommunicatorI result = new CommunicatorI(argsH, properties); + result.finishSetup(argsH); + return result; } - public static void - addArgumentPrefix(String prefix) + public static Communicator + initializeWithProperties(StringSeqHolder args, Properties properties) { - PropertiesI.addArgumentPrefix(prefix); + CommunicatorI result = new CommunicatorI(args, properties); + result.finishSetup(args); + return result; } public static IceInternal.Instance |