summaryrefslogtreecommitdiff
path: root/java/src/ServiceConfig.java
diff options
context:
space:
mode:
authorpjain <pjain@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-03-10 21:25:09 +0000
committerpjain <pjain@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-03-10 21:25:09 +0000
commitaa2e9ccc6ea95a71e9b57f853186030f2029addc (patch)
tree6bd1ef045ddfd4027e9d8c93a147d04aef384e5d /java/src/ServiceConfig.java
parentaedde8787710fa768a681f42dba1111da8e77697 (diff)
downloadATCD-aa2e9ccc6ea95a71e9b57f853186030f2029addc.tar.gz
Added support to load classes across the network.
Diffstat (limited to 'java/src/ServiceConfig.java')
-rw-r--r--java/src/ServiceConfig.java25
1 files changed, 21 insertions, 4 deletions
diff --git a/java/src/ServiceConfig.java b/java/src/ServiceConfig.java
index 8ffa26d9e98..3cf97db7eae 100644
--- a/java/src/ServiceConfig.java
+++ b/java/src/ServiceConfig.java
@@ -12,6 +12,7 @@
package ACE.ServiceConfigurator;
import java.io.*;
+import java.net.*;
import ACE.OS.*;
import ACE.Misc.*;
@@ -55,13 +56,15 @@ public class ServiceConfig
// Set '#' as comment character to be ignored and set '/' as
// ordinary character (was original comment character)
- in.commentChar ('#');
+ // in.commentChar ('#');
in.ordinaryChar ('/');
- // Set characters in ASCII range 33 to 47 and ASCII range 91 to 96
- // as ordinary characters
+ // Set characters in ASCII range 33 to 47, ASCII range 91 to 96,
+ // and ASCII range 123 to 126 as ordinary characters
in.wordChars ('!', '/'); // ASCII range 33 to 47
+ in.wordChars (':', '@'); // ASCII range 58 to 64
in.wordChars ('[', '`'); // ASCII range 91 to 96
+ in.wordChars ('{', '~'); // ASCII range 123 to 126
String className = null;
String classType = null;
@@ -95,7 +98,21 @@ public class ServiceConfig
{
args = in.sval;
// Load the class
- Class c = ServiceConfig.svcRep_.load (className);
+ Class c = null;
+
+ // First check if we need to load the class from the
+ // file system or from across the network.
+ if (className.lastIndexOf ("://") != -1)
+ {
+ // We need to get the bytes over the network since
+ // the name specified in the configuration file
+ // contains a protocol specification
+ c = ServiceConfig.svcRep_.load (new URL (className));
+ }
+ else
+ {
+ c = ServiceConfig.svcRep_.load (className);
+ }
// Note that c should be defined else an exception
// would have been thrown by now