public abstract class RemoteServer extends RemoteObject
RemoteServer
类是服务器实现共同的基类,提供框架支持多种远程引用语义。具体而言,需要创造和出口远程对象的功能(即使他们可以远程)是由
RemoteServer
抽象提供,其具体的子类(ES)。
ref
Modifier | Constructor and Description |
---|---|
protected |
RemoteServer()
构建了一个
RemoteServer 。
|
protected |
RemoteServer(RemoteRef ref)
构建一个与给定类型
RemoteServer 。
|
Modifier and Type | Method and Description |
---|---|
static String |
getClientHost()
返回用于在当前线程中处理的远程方法调用的客户端主机的字符串表示形式。
|
static PrintStream |
getLog()
返回流的RMI调用日志。
|
static void |
setLog(OutputStream out)
日志RMI调用输出流
out 。
|
protected RemoteServer()
RemoteServer
。
protected RemoteServer(RemoteRef ref)
RemoteServer
。
ref
-远程参考
public static String getClientHost() throws ServerNotActiveException
ServerNotActiveException
-如果没有远程方法调用是在当前线程中处理
public static void setLog(OutputStream out)
out
。如果
out
是
null
,呼叫记录关闭。
如果存在安全管理器,它的checkPermission
方法将与java.util.logging.LoggingPermission("control")
权限调用;这可能会导致一个SecurityException
。
out
-输出流,RMI调用应记录
SecurityException
-如果存在安全管理器及其
checkPermission
方法的调用失败
getLog()
public static PrintStream getLog()
setLog(java.io.OutputStream)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.