jdk/src/share/classes/javax/management/remote/rmi/RMIConnectorServer.java
changeset 1708 4e1939e6e6b5
parent 1570 4165709c91e3
child 4156 acaa49a2768a
--- a/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectorServer.java	Tue Dec 09 18:45:09 2008 +0100
+++ b/jdk/src/share/classes/javax/management/remote/rmi/RMIConnectorServer.java	Tue Dec 09 19:44:22 2008 +0100
@@ -602,6 +602,26 @@
         return true;
     }
 
+    /**
+     * {@inheritDoc}
+     * <P>The {@code RMIConnectorServer} class does support closing a specified
+     * client connection.
+     * @throws IllegalStateException if the server is not started or is closed.
+     * @throws IllegalArgumentException if {@code connectionId} is null or is
+     * not the id of any open connection.
+     * @since 1.7
+     */
+    @Override
+    public void closeConnection(String connectionId)
+            throws IOException {
+        if (isActive()) {
+            rmiServerImpl.closeConnection(connectionId);
+        } else {
+            throw new IllegalStateException(
+                    "The server is not started or is closed.");
+        }
+    }
+
     /* We repeat the definitions of connection{Opened,Closed,Failed}
        here so that they are accessible to other classes in this package
        even though they have protected access.  */