public final class MBeanServerConnectionFactory extends Object
A Factory class that creates the instances of MBeanServerConnection depending upon the given JMXServiceURL {@link javax.management.remote.JMXServiceURL}.
The returned instances are proxies to actual remote MBeanServerConnection.
final String user = (String) env.get(DefaultConfiguration.ADMIN_USER_ENV_PROPERTY_NAME);
final String pwd = (String) env.get(DefaultConfiguration.ADMIN_PASSWORD_ENV_PROPERTY_NAME);
return ( new AuthenticationInfo(user, pwd) );
Sets the HttpAddress for the given Map and JMXServiceURL
/* BEGIN -- S1WS_MOD */
final HttpConnectorAddress ad = new HttpConnectorAddress(serviceUrl.getHost(), serviceUrl.getPort(), isHttps(serviceUrl), serviceUrl.getURLPath());
/* END -- S1WS_MOD */
ad.setAuthenticationInfo(env2AuthenticationInfo(env));
return ( ad );
The static factory method that creates instance of MBeanServerConnection.
This method always creates a new MBeanServerConnection instance every time
it is called. If the call succeeds, the returned instance can be used to
invoke any MBeanServerConnection method immediately.
param
env a Map containing all the necessary varialbes.
param
serviceUrl an instance of JMXServiceURL specifying the JMXConnector
return
a ready-to-call MBeanServerConnection instance.
throws
Exception, in case the connection could not be established to the server-side.
return new RemoteMBeanServerConnection(env2HttpAddress(env, serviceUrl), env);