Module java.rmi
Package java.rmi.server

Class RemoteServer

java.lang.Object
java.rmi.server.RemoteObject
java.rmi.server.RemoteServer
所有已实现的接口:
Serializable, Remote
直接已知的子类:
UnicastRemoteObject

public abstract class RemoteServer extends RemoteObject
RemoteServer类是服务器实现的通用超类,并提供支持广泛的远程引用语义的框架。具体地说,创建和导出远程对象(即使它们在远程上可用)所需的功能由RemoteServer抽象提供,由其子类具体提供。
自:
1.1
参见:
  • Constructor Details

    • RemoteServer

      protected RemoteServer()
      构造一个RemoteServer
      自:
      1.1
    • RemoteServer

      protected RemoteServer(RemoteRef ref)
      构造具有给定引用类型的RemoteServer
      参数:
      ref - 远程引用
      自:
      1.1
  • Method Details

    • getClientHost

      public static String getClientHost() throws ServerNotActiveException
      返回当前线程中正在处理的远程方法调用的客户端主机的字符串表示形式。
      返回:
      客户端主机的字符串表示形式
      抛出:
      ServerNotActiveException - 如果当前线程中没有正在处理的远程方法调用
      自:
      1.1
    • setLog

      public static void setLog(OutputStream out)
      记录RMI调用到输出流out。如果outnull,则关闭调用日志记录。

      如果存在安全管理器,将调用其checkPermission方法,其中包含java.util.logging.LoggingPermission("control")权限;这可能导致SecurityException

      参数:
      out - 应记录RMI调用的输出流
      抛出:
      SecurityException - 如果存在安全管理器并且调用其checkPermission方法失败
      自:
      1.1
      参见:
    • getLog

      public static PrintStream getLog()
      返回用于RMI调用日志的流。
      返回:
      调用日志
      自:
      1.1
      参见: