summaryrefslogtreecommitdiff
path: root/java/src/IceInternal/TraceLevels.java
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2001-11-15 23:20:31 +0000
committerMark Spruiell <mes@zeroc.com>2001-11-15 23:20:31 +0000
commit1743bba7dd12d7cab787cd9f16ecd1df875d421c (patch)
tree05a2621e726e688315d27fb1ed02bfc0637e71fc /java/src/IceInternal/TraceLevels.java
parentminor fixes (diff)
downloadice-1743bba7dd12d7cab787cd9f16ecd1df875d421c.tar.bz2
ice-1743bba7dd12d7cab787cd9f16ecd1df875d421c.tar.xz
ice-1743bba7dd12d7cab787cd9f16ecd1df875d421c.zip
initial check-in
Diffstat (limited to 'java/src/IceInternal/TraceLevels.java')
-rw-r--r--java/src/IceInternal/TraceLevels.java87
1 files changed, 87 insertions, 0 deletions
diff --git a/java/src/IceInternal/TraceLevels.java b/java/src/IceInternal/TraceLevels.java
new file mode 100644
index 00000000000..331b40a7147
--- /dev/null
+++ b/java/src/IceInternal/TraceLevels.java
@@ -0,0 +1,87 @@
+// **********************************************************************
+//
+// Copyright (c) 2001
+// MutableRealms, Inc.
+// Huntsville, AL, USA
+//
+// All Rights Reserved
+//
+// **********************************************************************
+
+package IceInternal;
+
+final class TraceLevels
+{
+ public
+ TraceLevels(Ice.Properties properties)
+ {
+ network = 0;
+ networkCat = "Network";
+ protocol = 0;
+ protocolCat = "Protocol";
+ retry = 0;
+ retryCat = "Retry";
+ security = 0;
+ securityCat = "Security";
+
+ String value;
+ final String keyBase = "Ice.Trace.";
+
+ value = properties.getProperty(keyBase + networkCat);
+ if (value != null)
+ {
+ try
+ {
+ network = Integer.parseInt(value);
+ }
+ catch (NumberFormatException ex)
+ {
+ }
+ }
+
+ value = properties.getProperty(keyBase + protocolCat);
+ if (value != null)
+ {
+ try
+ {
+ protocol = Integer.parseInt(value);
+ }
+ catch (NumberFormatException ex)
+ {
+ }
+ }
+
+ value = properties.getProperty(keyBase + retryCat);
+ if (value != null)
+ {
+ try
+ {
+ retry = Integer.parseInt(value);
+ }
+ catch (NumberFormatException ex)
+ {
+ }
+ }
+
+ value = properties.getProperty(keyBase + securityCat);
+ if (value != null)
+ {
+ try
+ {
+ security = Integer.parseInt(value);
+ }
+ catch (NumberFormatException ex)
+ {
+ }
+ }
+ }
+
+ int network;
+ String networkCat;
+ int protocol;
+ String protocolCat;
+ int retry;
+ String retryCat;
+ int security;
+ String securityCat;
+}