Creates a new client connection. This method calls makeClient
and adds the returned client connection
object to an internal list. When this
RMIServerImpl
is shut down via its RMIServerImpl.close()
method, the close()
method of each object remaining in the list is called.
The fact that a client connection object is in this internal
list does not prevent it from being garbage collected.
Returns:
the newly-created
RMIConnection
. This is
usually the object created by
makeClient
, though
an implementation may choose to wrap that object in another
object implementing
RMIConnection
.
Parameters:
-
credentials - this object specifies the user-defined
credentials to be passed in to the server in order to
authenticate the caller before creating the
RMIConnection
. Can be null.
Throws:
-
IOException - if the new client object cannot be
created or exported.
-
SecurityException - if the given credentials do not allow
the server to authenticate the user successfully.
-
IllegalStateException - if {@link #getMBeanServer()}
is null.