Deactivates the connector server, that is, stops listening for
client connections. Calling this method will also close all
client connections that were made by this server. After this
method returns, whether normally or with an exception, the
connector server will not create any new client
connections.
Once a connector server has been stopped, it cannot be started
again.
Calling this method when the connector server has already
been stopped has no effect. Calling this method when the
connector server has not yet been started will disable the
connector server object permanently.
If closing a client connection produces an exception, that
exception is not thrown from this method. A JMXConnectionNotification
is emitted from this MBean with the
connection ID of the connection that could not be closed.
Closing a connector server is a potentially slow operation.
For example, if a client machine with an open connection has
crashed, the close operation might have to wait for a network
protocol timeout. Callers that do not want to block in a close
operation should do it in a separate thread.
This method calls the method close
on the connector server's RMIServerImpl
object.
If the RMIServerImpl
was bound to a JNDI
directory by the start
method, it is unbound
from the directory by this method.
Throws:
-
IOException - if the server cannot be closed cleanly,
or if the
RMIServerImpl
cannot be unbound from the
directory. When this exception is thrown, the server has
already attempted to close all client connections, if
appropriate; to call {@link RMIServerImpl#close()}; and to
unbind the
RMIServerImpl
from its directory, if
appropriate. All client connections are closed except possibly
those that generated exceptions when the server attempted to
close them.