Methods Summary |
---|
public static void | connect(java.rmi.Remote target, java.rmi.Remote source)Makes a Remote object ready for remote communication. This normally
happens implicitly when the object is sent or received as an argument
on a remote method call, but in some circumstances it is useful to
perform this action by making an explicit call. See the
{@link Stub#connect} method for more information.
if (proDelegate != null) {
proDelegate.connect(target, source);
}
|
private static java.lang.Object | createDelegateIfSpecified(java.lang.String classKey)
String className = (String)
AccessController.doPrivileged(new GetPropertyAction(classKey));
if (className == null) {
Properties props = getORBPropertiesFile();
if (props != null) {
className = props.getProperty(classKey);
}
}
if (className == null) {
className = defaultPortableRemoteObjectImplName;
}
try {
return (Object) loadDelegateClass(className).newInstance();
} catch (ClassNotFoundException ex) {
INITIALIZE exc = new INITIALIZE( "Cannot instantiate " + className);
exc.initCause( ex ) ;
throw exc ;
} catch (Exception ex) {
INITIALIZE exc = new INITIALIZE( "Error while instantiating" + className);
exc.initCause( ex ) ;
throw exc ;
}
|
public static void | exportObject(java.rmi.Remote obj)Makes a server object ready to receive remote calls. Note
that subclasses of PortableRemoteObject do not need to call this
method, as it is called by the constructor.
// Let the delegate do everything, including error handling.
if (proDelegate != null) {
proDelegate.exportObject(obj);
}
|
private static java.util.Properties | getORBPropertiesFile()Load the orb.properties file.
return (Properties) AccessController.doPrivileged(new GetORBPropertiesFileAction());
|
private static java.lang.Class | loadDelegateClass(java.lang.String className)
try {
ClassLoader loader = Thread.currentThread().getContextClassLoader();
return Class.forName(className, false, loader);
} catch (ClassNotFoundException e) {
// ignore, then try RMIClassLoader
}
try {
return RMIClassLoader.loadClass(className);
} catch (MalformedURLException e) {
String msg = "Could not load " + className + ": " + e.toString();
ClassNotFoundException exc = new ClassNotFoundException( msg ) ;
throw exc ;
}
|
public static java.lang.Object | narrow(java.lang.Object narrowFrom, java.lang.Class narrowTo)Checks to ensure that an object of a remote or abstract interface type
can be cast to a desired type.
if (proDelegate != null) {
return proDelegate.narrow(narrowFrom, narrowTo);
}
return null;
|
public static java.rmi.Remote | toStub(java.rmi.Remote obj)Returns a stub for the given server object.
if (proDelegate != null) {
return proDelegate.toStub(obj);
}
return null;
|
public static void | unexportObject(java.rmi.Remote obj)Deregisters a server object from the runtime, allowing the object to become
available for garbage collection.
if (proDelegate != null) {
proDelegate.unexportObject(obj);
}
|