提交 a27e1dac 编写于 作者: D dsamersoff

8002048: Protocol to discovery of manageable Java processes on a network

Summary: Introduce a protocol to discover manageble Java instances across a network subnet, JDP
Reviewed-by: sla, dfuchs
上级 a8030f89
...@@ -464,7 +464,32 @@ JMXStartRemoteDCmd::JMXStartRemoteDCmd(outputStream *output, bool heap_allocated ...@@ -464,7 +464,32 @@ JMXStartRemoteDCmd::JMXStartRemoteDCmd(outputStream *output, bool heap_allocated
_jmxremote_ssl_config_file _jmxremote_ssl_config_file
("jmxremote.ssl.config.file", ("jmxremote.ssl.config.file",
"set com.sun.management.jmxremote.ssl_config_file", "STRING", false) "set com.sun.management.jmxremote.ssl_config_file", "STRING", false),
// JDP Protocol support
_jmxremote_autodiscovery
("jmxremote.autodiscovery",
"set com.sun.management.jmxremote.autodiscovery", "STRING", false),
_jdp_port
("jdp.port",
"set com.sun.management.jdp.port", "INT", false),
_jdp_address
("jdp.address",
"set com.sun.management.jdp.address", "STRING", false),
_jdp_source_addr
("jdp.source_addr",
"set com.sun.management.jdp.source_addr", "STRING", false),
_jdp_ttl
("jdp.ttl",
"set com.sun.management.jdp.ttl", "INT", false),
_jdp_pause
("jdp.pause",
"set com.sun.management.jdp.pause", "INT", false)
{ {
_dcmdparser.add_dcmd_option(&_config_file); _dcmdparser.add_dcmd_option(&_config_file);
...@@ -480,6 +505,12 @@ JMXStartRemoteDCmd::JMXStartRemoteDCmd(outputStream *output, bool heap_allocated ...@@ -480,6 +505,12 @@ JMXStartRemoteDCmd::JMXStartRemoteDCmd(outputStream *output, bool heap_allocated
_dcmdparser.add_dcmd_option(&_jmxremote_ssl_enabled_protocols); _dcmdparser.add_dcmd_option(&_jmxremote_ssl_enabled_protocols);
_dcmdparser.add_dcmd_option(&_jmxremote_ssl_need_client_auth); _dcmdparser.add_dcmd_option(&_jmxremote_ssl_need_client_auth);
_dcmdparser.add_dcmd_option(&_jmxremote_ssl_config_file); _dcmdparser.add_dcmd_option(&_jmxremote_ssl_config_file);
_dcmdparser.add_dcmd_option(&_jmxremote_autodiscovery);
_dcmdparser.add_dcmd_option(&_jdp_port);
_dcmdparser.add_dcmd_option(&_jdp_address);
_dcmdparser.add_dcmd_option(&_jdp_source_addr);
_dcmdparser.add_dcmd_option(&_jdp_ttl);
_dcmdparser.add_dcmd_option(&_jdp_pause);
} }
...@@ -494,7 +525,6 @@ int JMXStartRemoteDCmd::num_arguments() { ...@@ -494,7 +525,6 @@ int JMXStartRemoteDCmd::num_arguments() {
} }
} }
void JMXStartRemoteDCmd::execute(TRAPS) { void JMXStartRemoteDCmd::execute(TRAPS) {
ResourceMark rm(THREAD); ResourceMark rm(THREAD);
HandleMark hm(THREAD); HandleMark hm(THREAD);
...@@ -524,7 +554,9 @@ void JMXStartRemoteDCmd::execute(TRAPS) { ...@@ -524,7 +554,9 @@ void JMXStartRemoteDCmd::execute(TRAPS) {
// file. // file.
#define PUT_OPTION(a) \ #define PUT_OPTION(a) \
if ( (a).is_set() ){ \ if ( (a).is_set() ){ \
options.print("%scom.sun.management.%s=%s", comma, (a).name(), (a).value()); \ options.print(\
( *((a).type()) == 'I' ) ? "%scom.sun.management.%s=%d" : "%scom.sun.management.%s=%s",\
comma, (a).name(), (a).value()); \
comma[0] = ','; \ comma[0] = ','; \
} }
...@@ -541,6 +573,12 @@ void JMXStartRemoteDCmd::execute(TRAPS) { ...@@ -541,6 +573,12 @@ void JMXStartRemoteDCmd::execute(TRAPS) {
PUT_OPTION(_jmxremote_ssl_enabled_protocols); PUT_OPTION(_jmxremote_ssl_enabled_protocols);
PUT_OPTION(_jmxremote_ssl_need_client_auth); PUT_OPTION(_jmxremote_ssl_need_client_auth);
PUT_OPTION(_jmxremote_ssl_config_file); PUT_OPTION(_jmxremote_ssl_config_file);
PUT_OPTION(_jmxremote_autodiscovery);
PUT_OPTION(_jdp_port);
PUT_OPTION(_jdp_address);
PUT_OPTION(_jdp_source_addr);
PUT_OPTION(_jdp_ttl);
PUT_OPTION(_jdp_pause);
#undef PUT_OPTION #undef PUT_OPTION
......
...@@ -257,6 +257,16 @@ class JMXStartRemoteDCmd : public DCmdWithParser { ...@@ -257,6 +257,16 @@ class JMXStartRemoteDCmd : public DCmdWithParser {
DCmdArgument<char *> _jmxremote_ssl_need_client_auth; DCmdArgument<char *> _jmxremote_ssl_need_client_auth;
DCmdArgument<char *> _jmxremote_ssl_config_file; DCmdArgument<char *> _jmxremote_ssl_config_file;
// JDP support
// Keep autodiscovery char* not bool to pass true/false
// as property value to java level.
DCmdArgument<char *> _jmxremote_autodiscovery;
DCmdArgument<jlong> _jdp_port;
DCmdArgument<char *> _jdp_address;
DCmdArgument<char *> _jdp_source_addr;
DCmdArgument<jlong> _jdp_ttl;
DCmdArgument<jlong> _jdp_pause;
public: public:
JMXStartRemoteDCmd(outputStream *output, bool heap_allocated); JMXStartRemoteDCmd(outputStream *output, bool heap_allocated);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册