java.lang.Objectjavax.management.remote.rmi.RMIServerImpl
javax.management.remote.rmi.RMIJRMPServerImpl
public class RMIJRMPServerImpl
     
一个 RMIServer 对象,它通过 JRMP 导出,并可创建如同由 JRMP 导出的 RMI 对象的客户端连接。用户代码不经常直接引用此类。
RMIServerImpl
   | 构造方法摘要 | |
|---|---|
RMIJRMPServerImpl(int port, RMIClientSocketFactory csf, RMIServerSocketFactory ssf, Map<String,?> env) 创建一个新的 RMIServer 对象,它将使用给定的套接字工厂从给定端口导出。 |  
    |
| 方法摘要 | |
|---|---|
 protected  void |  
     closeClient(RMIConnection client) 关闭由 makeClient 建立的客户端连接。 |  
    
 protected  void |  
     closeServer() 由 RMIServerImpl.close() 调用以通过取消导出此对象关闭连接器服务器。 |  
    
 protected  void |  
     export() 导出此 RMI 对象。  |  
    
 protected  String |  
     getProtocol() 返回该对象的协议字符串。  |  
    
 protected  RMIConnection |  
     makeClient(String connectionId, Subject subject) 创建一个如同从 JRMP 导出的 RMI 对象的新的客户端连接。  |  
    
  Remote |  
     toStub() 返回此 RMIServer 对象的可序列化的 stub。 |  
    
| 从类 javax.management.remote.rmi.RMIServerImpl 继承的方法 | 
|---|
clientClosed, close, getDefaultClassLoader, getMBeanServer, getVersion, newClient, setDefaultClassLoader, setMBeanServer |  
    
| 从类 java.lang.Object 继承的方法 | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |  
    
| 构造方法详细信息 | 
|---|
public RMIJRMPServerImpl(int port,
                         RMIClientSocketFactory csf,
                         RMIServerSocketFactory ssf,
                         Map<String,?> env)
                  throws IOException 
  创建一个新的 RMIServer 对象,它将使用给定的套接字工厂从给定端口导出。
port - 此对象及此对象创建的 
      RMIConnectionImpl 对象将从其导出的端口。可以为零,它指示任何可用的端口。
     csf - 创建的 RMI 对象的客户端套接字工厂。可以为 null。
     ssf - 创建的 RMI 对象的服务器套接字工厂。可以为 null。
     env - 环境映射。可以为 null。 
     IOException - 如果无法创建 
      RMIServer 对象。 
     IllegalArgumentException - 如果 
      port 为负。
     | 方法详细信息 | 
|---|
protected void export()
               throws IOException 
  RMIServerImpl 复制的描述
   导出此 RMI 对象。
RMIServerImpl 中的 
      export
     IOException - 如果无法导出此 RMI 对象。
     protected String getProtocol()
RMIServerImpl 复制的描述
   返回该对象的协议字符串。对于 RMI/JRMP,该字符串为 rmi;对于 RMI/IIOP,该字符串为 iiop。 
RMIServerImpl 中的 
      getProtocol
     public Remote toStub() throws IOException
返回此 RMIServer 对象的可序列化的 stub。
RMIServerImpl 中的 
      toStub
     IOException - 如果无法获得 stub,例如 RMIJRMPServerImpl 尚未导出。
     protected RMIConnection makeClient(String connectionId, Subject subject) throws IOException
创建一个如同从 JRMP 导出的 RMI 对象的新的客户端连接。新的 RMIConnection 对象的端口和套接字工厂就是为 RMIJRMPServerImpl 构造方法提供的对应参数。
RMIServerImpl 中的 
      makeClient
     connectionId - 新连接的 ID。由此连接器服务器打开的每个连接将具有不同的 ID。如果此参数为 null,则行为不明确。
     subject - 经验证的主题。可以为 null。 
     RMIConnection。 
     IOException - 如果无法创建或导出新的 
      RMIConnection 对象。
     protected void closeClient(RMIConnection client) throws IOException
RMIServerImpl 复制的描述
   关闭由 makeClient 建立的客户端连接。 
RMIServerImpl 中的 
      closeClient
     client - 由 
      makeClient 以前返回的一个连接,以前尚未在其上调用过 
      closeClient 方法。如果违反这些条件,包括 
      client 为 null 的情况,则行为不明确。 
     IOException - 如果无法关闭客户端连接。
     
protected void closeServer()
                    throws IOException 
  由 RMIServerImpl.close() 调用以通过取消导出此对象关闭连接器服务器。从此方法返回后,连接器服务器不接受任何新的连接。
RMIServerImpl 中的 
      closeServer
     IOException - 如果关闭连接器服务器的尝试失败。