Package com.sun.corba.ee.impl.util
Class JDKBridge
- java.lang.Object
-
- com.sun.corba.ee.impl.util.JDKBridge
-
public class JDKBridge extends java.lang.Object
Utility methods for doing various method calls which are used by multiple classes
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
JDKBridge.LoadClassCache
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String
LOCAL_CODEBASE_KEY
private static java.lang.String
localCodebase
private static java.util.logging.Logger
logger
private static java.lang.String
USE_CODEBASE_ONLY_KEY
private static boolean
useCodebaseOnly
private static ORBUtilSystemException
wrapper
-
Constructor Summary
Constructors Constructor Description JDKBridge()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getLocalCodebase()
Get local codebase System property (java.rmi.server.codebase).static java.lang.Class
loadClass(java.lang.String className)
Returns a class instance for the specified class.static java.lang.Class
loadClass(java.lang.String className, java.lang.String remoteCodebase)
Returns a class instance for the specified class.static java.lang.Class
loadClass(java.lang.String className, java.lang.String remoteCodebase, java.lang.ClassLoader loader)
Returns a class instance for the specified class.private static java.lang.Class
loadClassM(java.lang.String className, java.lang.String remoteCodebase, boolean useCodebaseOnly)
static void
setCodebaseProperties()
Set the codebase and useCodebaseOnly properties.static void
setLocalCodebase(java.lang.String codebase)
Set the default code base.static boolean
useCodebaseOnly()
Return true if the system property "java.rmi.server.useCodebaseOnly" is set, false otherwise.
-
-
-
Field Detail
-
wrapper
private static final ORBUtilSystemException wrapper
-
logger
private static java.util.logging.Logger logger
-
LOCAL_CODEBASE_KEY
private static final java.lang.String LOCAL_CODEBASE_KEY
- See Also:
- Constant Field Values
-
USE_CODEBASE_ONLY_KEY
private static final java.lang.String USE_CODEBASE_ONLY_KEY
- See Also:
- Constant Field Values
-
localCodebase
private static java.lang.String localCodebase
-
useCodebaseOnly
private static boolean useCodebaseOnly
-
-
Method Detail
-
getLocalCodebase
public static java.lang.String 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 java.lang.Class loadClass(java.lang.String className, java.lang.String remoteCodebase, java.lang.ClassLoader loader) throws java.lang.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
Class
object representing the loaded class. - Throws:
java.lang.ClassNotFoundException
- if class cannot be loaded.
-
loadClass
public static java.lang.Class loadClass(java.lang.String className, java.lang.String remoteCodebase) throws java.lang.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
Class
object representing the loaded class. - Throws:
java.lang.ClassNotFoundException
- if class cannot be loaded.
-
loadClass
public static java.lang.Class loadClass(java.lang.String className) throws java.lang.ClassNotFoundException
Returns a class instance for the specified class.- Parameters:
className
- the name of the class- Returns:
- the
Class
object representing the loaded class. - Throws:
java.lang.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
public static void setLocalCodebase(java.lang.String codebase)
Set the default code base. This method is here only for test code.- Parameters:
codebase
- The local codebase
-
loadClassM
private static java.lang.Class loadClassM(java.lang.String className, java.lang.String remoteCodebase, boolean useCodebaseOnly) throws java.lang.ClassNotFoundException
- Throws:
java.lang.ClassNotFoundException
-
-