5744N/A * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 5652N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 5652N/A * This code is free software; you can redistribute it and/or modify it 5652N/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. 5652N/A * This code is distributed in the hope that it will be useful, but WITHOUT 5652N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 5652N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 5652N/A * version 2 for more details (a copy is included in the LICENSE file that 5652N/A * You should have received a copy of the GNU General Public License version 5652N/A * 2 along with this work; if not, write to the Free Software Foundation, 5652N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 5652N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 5652N/A * or visit www.oracle.com if you need additional information or have any 5652N/A * A packet to broadcasts JMX URL 5652N/A * <li>UUID - broadcast session ID, changed every time when we start/stop 5652N/A * <li>JMX_URL - URL to connect to JMX service</li> 5652N/A * <li>MAIN_CLASS - optional name of main class, filled from sun.java.command stripped for 5652N/A * security reason to first space</li> 5652N/A * <li>INSTANCE_NAME - optional custom name of particular instance as provided by customer</li> 5652N/A * Create new instance from user provided data. Set mandatory fields 5652N/A * @param id - java instance id 5652N/A * @param jmxServiceUrl - JMX service url 5652N/A * Create new instance from network data Parse packet and set fields. 5652N/A * @param data - raw packet data as it came from a Net 5652N/A * @param mainClass - main class of running app 5652N/A * @param instanceName - name of instance as provided by customer 5652N/A * @return id of discovery session 5652N/A * @return assembled packet ready to be sent across a Net 5652N/A // Assemble packet from fields to byte array 5652N/A * @param o - packet to compare 5652N/A * @return either packet equals or not