Package com.sun.corba.ee.impl.util
Class JDKBridge
java.lang.Object
com.sun.corba.ee.impl.util.JDKBridge
Utility methods for doing various method calls which are used
by multiple classes
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Stringprivate static Stringprivate static Loggerprivate static final Stringprivate static booleanprivate static final ORBUtilSystemException -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringGet local codebase System property (java.rmi.server.codebase).static ClassReturns a class instance for the specified class.static ClassReturns a class instance for the specified class.static ClassloadClass(String className, String remoteCodebase, ClassLoader loader) Returns a class instance for the specified class.private static ClassloadClassM(String className, String remoteCodebase, boolean useCodebaseOnly) static voidSet the codebase and useCodebaseOnly properties.static voidsetLocalCodebase(String codebase) Set the default code base.static booleanReturn true if the system property "java.rmi.server.useCodebaseOnly" is set, false otherwise.
-
Field Details
-
wrapper
-
logger
-
LOCAL_CODEBASE_KEY
- See Also:
-
USE_CODEBASE_ONLY_KEY
- See Also:
-
localCodebase
-
useCodebaseOnly
private static boolean useCodebaseOnly
-
-
Constructor Details
-
JDKBridge
public JDKBridge()
-
-
Method Details
-
getLocalCodebase
Get local codebase System property (java.rmi.server.codebase). May be null or a space separated array of URLS.- Returns:
- The value of the property
-
useCodebaseOnly
public static boolean useCodebaseOnly()Return true if the system property "java.rmi.server.useCodebaseOnly" is set, false otherwise.- Returns:
- If the property is set
-
loadClass
public static Class loadClass(String className, String remoteCodebase, ClassLoader loader) throws ClassNotFoundException Returns a class instance for the specified class.- Parameters:
className- the name of the classremoteCodebase- a space-separated array of urls at which the class might be found. May be null.loader- a ClassLoader who may be used to load the class if all other methods fail.- Returns:
- the
Classobject representing the loaded class. - Throws:
ClassNotFoundException- if class cannot be loaded.
-
loadClass
public static Class loadClass(String className, String remoteCodebase) throws ClassNotFoundException Returns a class instance for the specified class.- Parameters:
className- the name of the classremoteCodebase- a space-separated array of urls at which the class might be found. May be null.- Returns:
- the
Classobject representing the loaded class. - Throws:
ClassNotFoundException- if class cannot be loaded.
-
loadClass
Returns a class instance for the specified class.- Parameters:
className- the name of the class- Returns:
- the
Classobject representing the loaded class. - Throws:
ClassNotFoundException- if class cannot be loaded.
-
setCodebaseProperties
public static void setCodebaseProperties()Set the codebase and useCodebaseOnly properties. This is public only for test code. -
setLocalCodebase
Set the default code base. This method is here only for test code.- Parameters:
codebase- The local codebase
-
loadClassM
private static Class loadClassM(String className, String remoteCodebase, boolean useCodebaseOnly) throws ClassNotFoundException - Throws:
ClassNotFoundException
-