Connects the underlying RMIServer stub to an ORB, if needed,
before serializing it. This is done using the environment
map that was provided to the constructor, if any, and as documented
in javax.management.remote.rmi.
This method then calls s.defaultWriteObject().
Usually, rmiServer is null if this object
was constructed with a JMXServiceURL, and jmxServiceURL
is null if this object is constructed with a RMIServer stub.
Note that the environment Map is not serialized, since the objects
it contains are assumed to be contextual and relevant only
with respect to the local environment (class loader, ORB, etc...).
After an RMIConnector is deserialized, it is assumed that the
user will call RMIConnector.connect(Map), providing a new Map that
can contain values which are contextually relevant to the new
local environment.
Since connection to the ORB is needed prior to serializing, and
since the ORB to connect to is one of those contextual parameters,
it is not recommended to re-serialize a just de-serialized object -
as the de-serialized object has no map. Thus, when an RMIConnector
object is needed for serialization or transmission to a remote
application, it is recommended to obtain a new RMIConnector stub
by calling RMIConnectorServer.toJMXConnector(Map).
The RMIServer stub of the RMI JMX Connector server to
which this client connector is (or will be) connected. This
field can be null when jmxServiceURL is not
null. This includes the case where jmxServiceURL
contains a serialized RMIServer stub. If both
rmiServer and jmxServiceURL are null then
serialization will fail.
The JMXServiceURL of the RMI JMX Connector server to
which this client connector will be connected. This field can
be null when rmiServer is not null. If both
rmiServer and jmxServiceURL are null then
serialization will fail.
The wrapped result of the
MBeanServerConnection method call. If the method
returned normally, this is the value returned, or null if the
method is void. If the method produced an
exception, this is the exception.