home *** CD-ROM | disk | FTP | other *** search
- package java.rmi.server;
-
- import java.io.OutputStream;
- import java.io.PrintStream;
-
- public abstract class RemoteServer extends RemoteObject {
- private static String logname = "RMI";
- private static LogStream log;
-
- protected RemoteServer() {
- }
-
- protected RemoteServer(RemoteRef var1) {
- super(var1);
- }
-
- public static String getClientHost() throws ServerNotActiveException {
- try {
- Class var0 = Class.forName(RemoteRef.packagePrefix + ".UnicastServerRef");
- ServerRef var1 = (ServerRef)var0.newInstance();
- return var1.getClientHost();
- } catch (ServerNotActiveException var2) {
- throw var2;
- } catch (Exception var3) {
- throw new ServerNotActiveException("Client host unobtainable");
- }
- }
-
- public static void setLog(OutputStream var0) {
- if (var0 == null) {
- log = null;
- } else {
- LogStream var1 = LogStream.log(logname);
- var1.setOutputStream(var0);
- log = var1;
- }
- }
-
- public static PrintStream getLog() {
- return log;
- }
-
- static {
- try {
- log = Boolean.getBoolean("java.rmi.server.logCalls") ? LogStream.log(logname) : null;
- } catch (Exception var0) {
- }
- }
- }
-