public class RMIJRMPServerImpl extends RMIServerImpl
一是出口通过JRMP和创建RMI对象的出口通过JRMP客户端连接RMIServer
对象。用户代码通常不直接引用这个类。
RMIServerImpl
Constructor and Description |
---|
RMIJRMPServerImpl(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf, Map<String,?> env)
创建一个新的
RMIServer 对象,将出口在给定的端口使用给定的套接字工厂。
|
Modifier and Type | Method and Description |
---|---|
protected void |
closeClient(RMIConnection client)
关闭一个由
makeClient 客户端连接。
|
protected void |
closeServer()
被
RMIServerImpl.close() 通过unexporting这个对象关闭连接器服务器。
|
protected void |
export()
出口这个RMI对象。
|
protected String |
getProtocol()
返回此对象的协议字符串。
|
protected RMIConnection |
makeClient(String connectionId, Subject subject)
创建一个新的客户端连接作为一个RMI对象出口通过JRMP。
|
Remote |
toStub()
返回此对象的序列化
RMIServer 存根。
|
clientClosed, close, getDefaultClassLoader, getMBeanServer, getVersion, newClient, setDefaultClassLoader, setMBeanServer
public RMIJRMPServerImpl(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf, Map<String,?> env) throws IOException
创建一个新的RMIServer
对象,将出口在给定的端口使用给定的套接字工厂。
port
港-该对象和
RMIConnectionImpl
对象创建将出口。可以为零,以指示任何可用的端口。
csf
-创建RMI对象的客户端套接字工厂。可以为空。
ssf
-创建RMI对象服务器套接字工厂。可以为空。
env
-环境Map。可以为空。
IOException
-如果
RMIServer
不能创建对象。
IllegalArgumentException
-如果
port
是负的。
protected void export() throws IOException
RMIServerImpl
出口这个RMI对象。
export
方法重写,继承类
RMIServerImpl
IOException
如果RMI对象不能出口。
protected String getProtocol()
RMIServerImpl
返回此对象的协议字符串。字符串是RMI / JRMP和iiop
为RMI/IIOP rmi
。
getProtocol
方法重写,继承类
RMIServerImpl
public Remote toStub() throws IOException
返回此对象的序列化RMIServer
存根。
toStub
方法重写,继承类
RMIServerImpl
IOException
如果存根不能获得这rmijrmpserverimpl尚未出口呢。
protected RMIConnection makeClient(String connectionId, Subject subject) throws IOException
创建一个新的客户端连接作为一个RMI对象出口通过JRMP。端口和套接字工厂新RMIConnection
对象提供给RMIJRMPServerImpl
构造函数的。
makeClient
方法重写,继承类
RMIServerImpl
connectionId
-新连接的ID。由该连接器服务器打开的每一个连接都将有一个不同的身份。如果这个参数为空,则该行为是未指定的。
subject
-认证的主体。可以为空。
RMIConnection
。
IOException
-如果新的
RMIConnection
对象不能创造或出口。
protected void closeClient(RMIConnection client) throws IOException
RMIServerImpl
关闭一个由makeClient
客户端连接。
closeClient
方法重写,继承类
RMIServerImpl
client
-连接之前返回
makeClient
,
closeClient
方法没有被调用。如果违反了这些条件的行为是未定义的,包括案件
client
是空的。
IOException
如果客户端连接无法关闭。
protected void closeServer() throws IOException
被RMIServerImpl.close()
通过unexporting这个对象关闭连接器服务器。从这个方法返回后,连接器服务器不能接受任何新的连接。
closeServer
方法重写,继承类
RMIServerImpl
IOException
如果尝试关闭连接服务器失败。
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.