summaryrefslogtreecommitdiff
path: root/java/src/Ice/Util.java
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/Ice/Util.java')
-rw-r--r--java/src/Ice/Util.java52
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