use of org.ow2.proactive.jmx.naming.JMXTransportProtocol in project scheduling by ow2-proactive.
the class JMXClientHelper method connect.
/**
* Establishes the connection to the connector server by calling {@link #connect(JMXTransportProtocol)}
* using the JMXTransportProtocol specified by the {@link #PA_JMX_CLIENT_PROTOCOL} property
* that can be {@link JMXTransportProtocol#RMI} or {@link JMXTransportProtocol#RO}.
* If the property is not defined the {@link JMXTransportProtocol#RMI} protocol is used.
*
* @return <code>true</code> if this helper is connected otherwise return <code>false</code>
*/
public boolean connect() {
JMXTransportProtocol protocol = JMXTransportProtocol.RMI;
final String property = System.getProperty(JMXClientHelper.PA_JMX_CLIENT_PROTOCOL);
if (property != null && JMXTransportProtocol.valueOf(property.toUpperCase()) == JMXTransportProtocol.RO) {
protocol = JMXTransportProtocol.RO;
}
return this.connect(protocol);
}
Aggregations