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.ObjectUtility methods for doing various method calls which are used by multiple classes
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static classJDKBridge.LoadClassCache
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.StringLOCAL_CODEBASE_KEYprivate static java.lang.StringlocalCodebaseprivate static java.util.logging.Loggerloggerprivate static java.lang.StringUSE_CODEBASE_ONLY_KEYprivate static booleanuseCodebaseOnlyprivate static ORBUtilSystemExceptionwrapper
-
Constructor Summary
Constructors Constructor Description JDKBridge()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringgetLocalCodebase()Get local codebase System property (java.rmi.server.codebase).static java.lang.ClassloadClass(java.lang.String className)Returns a class instance for the specified class.static java.lang.ClassloadClass(java.lang.String className, java.lang.String remoteCodebase)Returns a class instance for the specified class.static java.lang.ClassloadClass(java.lang.String className, java.lang.String remoteCodebase, java.lang.ClassLoader loader)Returns a class instance for the specified class.private static java.lang.ClassloadClassM(java.lang.String className, java.lang.String remoteCodebase, boolean useCodebaseOnly)static voidsetCodebaseProperties()Set the codebase and useCodebaseOnly properties.static voidsetLocalCodebase(java.lang.String codebase)Set the default code base.static booleanuseCodebaseOnly()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.ClassNotFoundExceptionReturns 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:
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.ClassNotFoundExceptionReturns 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:
java.lang.ClassNotFoundException- if class cannot be loaded.
-
loadClass
public static java.lang.Class loadClass(java.lang.String className) throws java.lang.ClassNotFoundExceptionReturns a class instance for the specified class.- Parameters:
className- the name of the class- Returns:
- the
Classobject 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
-
-