JavaTM 2 Platform
Standard Ed. 6

java.rmi.server
类 RemoteServer

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

public abstract class RemoteServer
extends RemoteObject

RemoteServer 类是服务器实现的公共超类,并提供支持大量远程引用语义的框架。需要特别指出的是,创建和导出远程对象所需的功能(即使其远程可用)理论上由 RemoteServer 提供,具体由其子类提供。

从以下版本开始:
JDK1.1
另请参见:
序列化表格

字段摘要
 
从类 java.rmi.server.RemoteObject 继承的字段
ref
 
构造方法摘要
protected RemoteServer()
          构造一个 RemoteServer
protected RemoteServer(RemoteRef ref)
          构造带指定引用类型的 RemoteServer
 
方法摘要
static String getClientHost()
          返回一个客户机主机的字符串表示形式,用于在当前线程中正在处理的远程方法调用。
static PrintStream getLog()
          返回用于 RMI 调用日志的流。
static void setLog(OutputStream out)
          将 RMI 调用记录到输出流 out 中。
 
从类 java.rmi.server.RemoteObject 继承的方法
equals, getRef, hashCode, toString, toStub
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

RemoteServer

protected RemoteServer()
构造一个 RemoteServer

从以下版本开始:
JDK1.1

RemoteServer

protected RemoteServer(RemoteRef ref)
构造带指定引用类型的 RemoteServer

参数:
ref - 远程引用
从以下版本开始:
JDK1.1
方法详细信息

getClientHost

public static String getClientHost()
                            throws ServerNotActiveException
返回一个客户机主机的字符串表示形式,用于在当前线程中正在处理的远程方法调用。

返回:
远程客户机主机的字符串表示形式
抛出:
ServerNotActiveException - 如果在当前线程中没有处理远程方法调用
从以下版本开始:
JDK1.1

setLog

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

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

参数:
out - 应该将 RMI 调用记录到其中的输出流
抛出:
SecurityException - 如果存在安全管理器且其 checkPermission 方法的调用失败
从以下版本开始:
JDK1.1
另请参见:
getLog()

getLog

public static PrintStream getLog()
返回用于 RMI 调用日志的流。

返回:
调用日志
从以下版本开始:
JDK1.1
另请参见:
setLog(java.io.OutputStream)

JavaTM 2 Platform
Standard Ed. 6

提交错误或意见

版权所有 2008 Sun Microsystems, Inc. 保留所有权利。请遵守GNU General Public License, version 2 only