5744N/A/*
5744N/A * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
5744N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5744N/A *
5744N/A * This code is free software; you can redistribute it and/or modify it
5744N/A * under the terms of the GNU General Public License version 2 only, as
5744N/A * published by the Free Software Foundation. Oracle designates this
5744N/A * particular file as subject to the "Classpath" exception as provided
5744N/A * by Oracle in the LICENSE file that accompanied this code.
5744N/A *
5744N/A * This code is distributed in the hope that it will be useful, but WITHOUT
5744N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5744N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
5744N/A * version 2 for more details (a copy is included in the LICENSE file that
5744N/A * accompanied this code).
5744N/A *
5744N/A * You should have received a copy of the GNU General Public License version
5744N/A * 2 along with this work; if not, write to the Free Software Foundation,
5744N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5744N/A *
5744N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5744N/A * or visit www.oracle.com if you need additional information or have any
5744N/A * questions.
5744N/A */
5652N/A/**
5652N/A * Summary
5652N/A * -------
5652N/A *
5652N/A * Define a lightweight network protocol for discovering running and
5652N/A * manageable Java processes within a network subnet.
5652N/A *
5652N/A *
5652N/A * Description
5652N/A * -----------
5652N/A *
5652N/A * The protocol is lightweight multicast based, and works like a beacon,
5652N/A * broadcasting the JMXService URL needed to connect to the external JMX
5652N/A * agent if an application is started with appropriate parameters.
5652N/A *
5652N/A * The payload is structured like this:
5652N/A *
5652N/A * 4 bytes JDP magic (0xC0FFEE42)
5652N/A * 2 bytes JDP protocol version (1)
5652N/A * 2 bytes size of the next entry
5652N/A * x bytes next entry (UTF-8 encoded)
5652N/A * 2 bytes size of next entry
5652N/A * ... Rinse and repeat...
5652N/A *
5652N/A * The payload will be parsed as even entries being keys, odd entries being
5652N/A * values.
5652N/A *
5652N/A * The standard JDP packet contains four entries:
5652N/A *
5652N/A * - `DISCOVERABLE_SESSION_UUID` -- Unique id of the instance; this id changes every time
5652N/A * the discovery protocol starts and stops
5652N/A *
5652N/A * - `MAIN_CLASS` -- The value of the `sun.java.command` property
5652N/A *
5652N/A * - `JMX_SERVICE_URL` -- The URL to connect to the JMX agent
5652N/A *
5652N/A * - `INSTANCE_NAME` -- The user-provided name of the running instance
5652N/A *
6111N/A * The protocol sends packets to 224.0.23.178:7095 by default.
5652N/A *
5652N/A * The protocol uses system properties to control it's behaviour:
5652N/A * - `com.sun.management.jdp.port` -- override default port
5652N/A *
5652N/A * - `com.sun.management.jdp.address` -- override default address
5652N/A *
5652N/A * - `com.sun.management.jmxremote.autodiscovery` -- whether we should start autodiscovery or
5652N/A * not. Autodiscovery starts if and only if following conditions are met: (autodiscovery is
5652N/A * true OR (autodiscovery is not set AND jdp.port is set))
5652N/A *
5652N/A * - `com.sun.management.jdp.ttl` -- set ttl for broadcast packet, default is 1
5652N/A * - `com.sun.management.jdp.pause` -- set broadcast interval in seconds default is 5
5652N/A * - `com.sun.management.jdp.source_addr` -- an address of interface to use for broadcast
5652N/A */
5652N/A
5652N/Apackage sun.management.jdp;