| Modifier and Type | Method and Description |
|---|---|
static Registry |
createRegistry(int port)
在本地主机上创建并导出
Registry实例,该实例接受指定的
port上的请求。
|
static Registry |
createRegistry(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf)
在本地主机上创建并导出
Registry实例,该实例使用自定义套接字工厂进行与该实例的通信。
|
static Registry |
getRegistry()
返回对默认注册表端口1099的本地主机的远程对象
Registry 。
|
static Registry |
getRegistry(int port)
在指定的port上返回对本地主机的远程对象
Registry的
port 。
|
static Registry |
getRegistry(String host)
返回参考对远程对象
Registry上的指定
host 1099默认注册表端口上。
|
static Registry |
getRegistry(String host, int port)
返回对指定的
host和
port上的远程对象
Registry的
port 。
|
static Registry |
getRegistry(String host, int port, RMIClientSocketFactory csf)
返回本地创建的对指定的
host和
port上的远程对象
Registry的远程引用。
|
public static Registry getRegistry() throws RemoteException
Registry 。
RemoteException - 如果无法创建引用
public static Registry getRegistry(int port) throws RemoteException
Registry的
port 。
port - 注册表接受请求的端口
RemoteException - 如果无法创建引用
public static Registry getRegistry(String host) throws RemoteException
Registry指定的
host 1099如果默认的注册表端口
host是
null ,该本地主机使用。
host - 远程注册表的主机
RemoteException - 如果引用无法创建
public static Registry getRegistry(String host, int port) throws RemoteException
host和port上的远程对象Registry的port 。
如果host是null ,则使用本地主机。
host - 远程注册表的主机
port - 注册表接受请求的端口
RemoteException - 如果无法创建引用
public static Registry getRegistry(String host, int port, RMIClientSocketFactory csf) throws RemoteException
host和port上的远程对象Registry的本地创建的远程引用。
与此远程注册表的通信将使用随附的RMIClientSocketFactory csf创建Socket连接到远程host和port上的注册表。
host - 远程注册表的主机
port - 注册表接受请求的端口
csf - 客户端Socket工厂用于连接注册表。
如果csf为空,则默认客户端Socket工厂将在注册表存根中使用。
RemoteException - 如果无法创建引用
public static Registry createRegistry(int port) throws RemoteException
Registry实例,该实例接受指定的port的port 。
所述Registry实例被导出为如果静态UnicastRemoteObject.exportObject方法被调用时,使所述Registry实例和指定port作为参数,不同的是Registry实例与公知的对象标识符,导出ObjID与值构建的实例ObjID.REGISTRY_ID 。
port - 注册表接受请求的端口
RemoteException - 如果无法导出注册表
public static Registry createRegistry(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf) throws RemoteException
Registry实例,该实例使用自定义套接字工厂进行与该实例的通信。
所创建的注册表监听给定传入请求port使用ServerSocket从所提供的创建RMIServerSocketFactory 。
导出Registry实例,就像调用静态UnicastRemoteObject.exportObject方法一样,传递Registry实例,指定的port ,指定的RMIClientSocketFactory和指定的RMIServerSocketFactory作为参数,不同之处在于使用公知的对象标识符导出Registry实例, ObjID实例构造的值为ObjID.REGISTRY_ID 。
port - 注册表接受请求的端口
csf - 客户端
Socket工厂用于连接注册表
ssf - 服务器端
ServerSocket工厂用于接受注册表的连接
RemoteException - 如果无法导出注册表
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.