sun.management.jdp.JdpJmxPacket Java Examples
The following examples show how to use
sun.management.jdp.JdpJmxPacket.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: JdpDoSomething.java From openjdk-8-source with GNU General Public License v2.0 | 7 votes |
public static void printJdpPacket(JdpJmxPacket p) { if (getVerbose()) { try { RandomAccessFile f = new RandomAccessFile("out.dmp", "rw"); f.write(p.getPacketData()); f.close(); } catch (IOException e) { System.out.println("Can't write a dump file: " + e); } System.out.println("Id: " + p.getId()); System.out.println("Jmx: " + p.getJmxServiceUrl()); System.out.println("Main: " + p.getMainClass()); System.out.println("InstanceName: " + p.getInstanceName()); System.out.println("ProccessId: " + p.getProcessId()); System.out.println("BroadcastInterval: " + p.getBroadcastInterval()); System.out.println("Rmi Hostname: " + p.getRmiHostname()); System.out.flush(); } }
Example #2
Source File: JdpDoSomething.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
public static void printJdpPacket(JdpJmxPacket p) { if (getVerbose()) { try { RandomAccessFile f = new RandomAccessFile("out.dmp", "rw"); f.write(p.getPacketData()); f.close(); } catch (IOException e) { System.out.println("Can't write a dump file: " + e); } System.out.println("Id: " + p.getId()); System.out.println("Jmx: " + p.getJmxServiceUrl()); System.out.println("Main: " + p.getMainClass()); System.out.println("InstanceName: " + p.getInstanceName()); System.out.println("ProccessId: " + p.getProcessId()); System.out.println("BroadcastInterval: " + p.getBroadcastInterval()); System.out.println("Rmi Hostname: " + p.getRmiHostname()); System.out.flush(); } }
Example #3
Source File: JdpClient.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
private void checkFieldPresence(JdpJmxPacket p) throws IOException, JdpException { byte[] b = p.getPacketData(); JdpPacketReader reader = new JdpPacketReader(b); Map<String, String> pMap = reader.getDiscoveryDataAsMap(); get(pMap, JdpJmxPacket.UUID_KEY); get(pMap, JdpJmxPacket.MAIN_CLASS_KEY); get(pMap, JdpJmxPacket.JMX_SERVICE_URL_KEY); // get(pMap, JdpJmxPacket.INSTANCE_NAME_KEY); get(pMap, JdpJmxPacket.PROCESS_ID_KEY); get(pMap, JdpJmxPacket.BROADCAST_INTERVAL_KEY); get(pMap, JdpJmxPacket.RMI_HOSTNAME_KEY); }
Example #4
Source File: JdpDoSomething.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
public static void printJdpPacket(JdpJmxPacket p) { if (getVerbose()) { try { RandomAccessFile f = new RandomAccessFile("out.dmp", "rw"); f.write(p.getPacketData()); f.close(); } catch (IOException e) { System.out.println("Can't write a dump file: " + e); } System.out.println("Id: " + p.getId()); System.out.println("Jmx: " + p.getJmxServiceUrl()); System.out.println("Main: " + p.getMainClass()); System.out.println("InstanceName: " + p.getInstanceName()); System.out.println("ProccessId: " + p.getProcessId()); System.out.println("BroadcastInterval: " + p.getBroadcastInterval()); System.out.println("Rmi Hostname: " + p.getRmiHostname()); System.out.flush(); } }
Example #5
Source File: JdpDoSomething.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
public static void printJdpPacket(JdpJmxPacket p) { if (getVerbose()) { try { RandomAccessFile f = new RandomAccessFile("out.dmp", "rw"); f.write(p.getPacketData()); f.close(); } catch (IOException e) { System.out.println("Can't write a dump file: " + e); } System.out.println("Id: " + p.getId()); System.out.println("Jmx: " + p.getJmxServiceUrl()); System.out.println("Main: " + p.getMainClass()); System.out.println("InstanceName: " + p.getInstanceName()); System.out.println("ProccessId: " + p.getProcessId()); System.out.println("BroadcastInterval: " + p.getBroadcastInterval()); System.out.println("Rmi Hostname: " + p.getRmiHostname()); System.out.flush(); } }
Example #6
Source File: JdpClient.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
private void checkFieldPresence(JdpJmxPacket p) throws IOException, JdpException { byte[] b = p.getPacketData(); JdpPacketReader reader = new JdpPacketReader(b); Map<String, String> pMap = reader.getDiscoveryDataAsMap(); get(pMap, JdpJmxPacket.UUID_KEY); get(pMap, JdpJmxPacket.MAIN_CLASS_KEY); get(pMap, JdpJmxPacket.JMX_SERVICE_URL_KEY); // get(pMap, JdpJmxPacket.INSTANCE_NAME_KEY); get(pMap, JdpJmxPacket.PROCESS_ID_KEY); get(pMap, JdpJmxPacket.BROADCAST_INTERVAL_KEY); get(pMap, JdpJmxPacket.RMI_HOSTNAME_KEY); }
Example #7
Source File: JdpDoSomething.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
public static void printJdpPacket(JdpJmxPacket p) { if (getVerbose()) { try { RandomAccessFile f = new RandomAccessFile("out.dmp", "rw"); f.write(p.getPacketData()); f.close(); } catch (IOException e) { System.out.println("Can't write a dump file: " + e); } System.out.println("Id: " + p.getId()); System.out.println("Jmx: " + p.getJmxServiceUrl()); System.out.println("Main: " + p.getMainClass()); System.out.println("InstanceName: " + p.getInstanceName()); System.out.println("ProccessId: " + p.getProcessId()); System.out.println("BroadcastInterval: " + p.getBroadcastInterval()); System.out.println("Rmi Hostname: " + p.getRmiHostname()); System.out.flush(); } }
Example #8
Source File: JdpClient.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
private void checkFieldPresence(JdpJmxPacket p) throws IOException, JdpException { byte[] b = p.getPacketData(); JdpPacketReader reader = new JdpPacketReader(b); Map<String, String> pMap = reader.getDiscoveryDataAsMap(); get(pMap, JdpJmxPacket.UUID_KEY); get(pMap, JdpJmxPacket.MAIN_CLASS_KEY); get(pMap, JdpJmxPacket.JMX_SERVICE_URL_KEY); // get(pMap, JdpJmxPacket.INSTANCE_NAME_KEY); get(pMap, JdpJmxPacket.PROCESS_ID_KEY); get(pMap, JdpJmxPacket.BROADCAST_INTERVAL_KEY); get(pMap, JdpJmxPacket.RMI_HOSTNAME_KEY); }
Example #9
Source File: JdpClient.java From jdk8u60 with GNU General Public License v2.0 | 6 votes |
private void checkFieldPresence(JdpJmxPacket p) throws IOException, JdpException { byte[] b = p.getPacketData(); JdpPacketReader reader = new JdpPacketReader(b); Map<String, String> pMap = reader.getDiscoveryDataAsMap(); get(pMap, JdpJmxPacket.UUID_KEY); get(pMap, JdpJmxPacket.MAIN_CLASS_KEY); get(pMap, JdpJmxPacket.JMX_SERVICE_URL_KEY); // get(pMap, JdpJmxPacket.INSTANCE_NAME_KEY); get(pMap, JdpJmxPacket.PROCESS_ID_KEY); get(pMap, JdpJmxPacket.BROADCAST_INTERVAL_KEY); get(pMap, JdpJmxPacket.RMI_HOSTNAME_KEY); }
Example #10
Source File: JdpClient.java From hottub with GNU General Public License v2.0 | 6 votes |
private void checkFieldPresence(JdpJmxPacket p) throws IOException, JdpException { byte[] b = p.getPacketData(); JdpPacketReader reader = new JdpPacketReader(b); Map<String, String> pMap = reader.getDiscoveryDataAsMap(); get(pMap, JdpJmxPacket.UUID_KEY); get(pMap, JdpJmxPacket.MAIN_CLASS_KEY); get(pMap, JdpJmxPacket.JMX_SERVICE_URL_KEY); // get(pMap, JdpJmxPacket.INSTANCE_NAME_KEY); get(pMap, JdpJmxPacket.PROCESS_ID_KEY); get(pMap, JdpJmxPacket.BROADCAST_INTERVAL_KEY); get(pMap, JdpJmxPacket.RMI_HOSTNAME_KEY); }
Example #11
Source File: JdpDoSomething.java From hottub with GNU General Public License v2.0 | 6 votes |
public static void printJdpPacket(JdpJmxPacket p) { if (getVerbose()) { try { RandomAccessFile f = new RandomAccessFile("out.dmp", "rw"); f.write(p.getPacketData()); f.close(); } catch (IOException e) { System.out.println("Can't write a dump file: " + e); } System.out.println("Id: " + p.getId()); System.out.println("Jmx: " + p.getJmxServiceUrl()); System.out.println("Main: " + p.getMainClass()); System.out.println("InstanceName: " + p.getInstanceName()); System.out.println("ProccessId: " + p.getProcessId()); System.out.println("BroadcastInterval: " + p.getBroadcastInterval()); System.out.println("Rmi Hostname: " + p.getRmiHostname()); System.out.flush(); } }
Example #12
Source File: JdpClient.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
private void checkFieldPresence(JdpJmxPacket p) throws IOException, JdpException { byte[] b = p.getPacketData(); JdpPacketReader reader = new JdpPacketReader(b); Map<String, String> pMap = reader.getDiscoveryDataAsMap(); get(pMap, JdpJmxPacket.UUID_KEY); get(pMap, JdpJmxPacket.MAIN_CLASS_KEY); get(pMap, JdpJmxPacket.JMX_SERVICE_URL_KEY); // get(pMap, JdpJmxPacket.INSTANCE_NAME_KEY); get(pMap, JdpJmxPacket.PROCESS_ID_KEY); get(pMap, JdpJmxPacket.BROADCAST_INTERVAL_KEY); get(pMap, JdpJmxPacket.RMI_HOSTNAME_KEY); }
Example #13
Source File: JdpClient.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
private void checkFieldPresence(JdpJmxPacket p) throws IOException, JdpException { byte[] b = p.getPacketData(); JdpPacketReader reader = new JdpPacketReader(b); Map<String, String> pMap = reader.getDiscoveryDataAsMap(); get(pMap, JdpJmxPacket.UUID_KEY); get(pMap, JdpJmxPacket.MAIN_CLASS_KEY); get(pMap, JdpJmxPacket.JMX_SERVICE_URL_KEY); // get(pMap, JdpJmxPacket.INSTANCE_NAME_KEY); get(pMap, JdpJmxPacket.PROCESS_ID_KEY); get(pMap, JdpJmxPacket.BROADCAST_INTERVAL_KEY); get(pMap, JdpJmxPacket.RMI_HOSTNAME_KEY); }
Example #14
Source File: JdpClient.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
private void checkFieldPresence(JdpJmxPacket p) throws IOException, JdpException { byte[] b = p.getPacketData(); JdpPacketReader reader = new JdpPacketReader(b); Map<String, String> pMap = reader.getDiscoveryDataAsMap(); get(pMap, JdpJmxPacket.UUID_KEY); get(pMap, JdpJmxPacket.MAIN_CLASS_KEY); get(pMap, JdpJmxPacket.JMX_SERVICE_URL_KEY); // get(pMap, JdpJmxPacket.INSTANCE_NAME_KEY); get(pMap, JdpJmxPacket.PROCESS_ID_KEY); get(pMap, JdpJmxPacket.BROADCAST_INTERVAL_KEY); get(pMap, JdpJmxPacket.RMI_HOSTNAME_KEY); }
Example #15
Source File: JdpDoSomething.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
public static void printJdpPacket(JdpJmxPacket p) { if (getVerbose()) { try { RandomAccessFile f = new RandomAccessFile("out.dmp", "rw"); f.write(p.getPacketData()); f.close(); } catch (IOException e) { System.out.println("Can't write a dump file: " + e); } System.out.println("Id: " + p.getId()); System.out.println("Jmx: " + p.getJmxServiceUrl()); System.out.println("Main: " + p.getMainClass()); System.out.println("InstanceName: " + p.getInstanceName()); System.out.println("ProccessId: " + p.getProcessId()); System.out.println("BroadcastInterval: " + p.getBroadcastInterval()); System.out.println("Rmi Hostname: " + p.getRmiHostname()); System.out.flush(); } }
Example #16
Source File: JdpDoSomething.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
public static void printJdpPacket(JdpJmxPacket p) { if (getVerbose()) { try { RandomAccessFile f = new RandomAccessFile("out.dmp", "rw"); f.write(p.getPacketData()); f.close(); } catch (IOException e) { System.out.println("Can't write a dump file: " + e); } System.out.println("Id: " + p.getId()); System.out.println("Jmx: " + p.getJmxServiceUrl()); System.out.println("Main: " + p.getMainClass()); System.out.println("InstanceName: " + p.getInstanceName()); System.out.println("ProccessId: " + p.getProcessId()); System.out.println("BroadcastInterval: " + p.getBroadcastInterval()); System.out.println("Rmi Hostname: " + p.getRmiHostname()); System.out.flush(); } }
Example #17
Source File: JdpClient.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
private void checkFieldPresence(JdpJmxPacket p) throws IOException, JdpException { byte[] b = p.getPacketData(); JdpPacketReader reader = new JdpPacketReader(b); Map<String, String> pMap = reader.getDiscoveryDataAsMap(); get(pMap, JdpJmxPacket.UUID_KEY); get(pMap, JdpJmxPacket.MAIN_CLASS_KEY); get(pMap, JdpJmxPacket.JMX_SERVICE_URL_KEY); // get(pMap, JdpJmxPacket.INSTANCE_NAME_KEY); get(pMap, JdpJmxPacket.PROCESS_ID_KEY); get(pMap, JdpJmxPacket.BROADCAST_INTERVAL_KEY); get(pMap, JdpJmxPacket.RMI_HOSTNAME_KEY); }
Example #18
Source File: JdpDoSomething.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
public static void printJdpPacket(JdpJmxPacket p) { if (getVerbose()) { try { RandomAccessFile f = new RandomAccessFile("out.dmp", "rw"); f.write(p.getPacketData()); f.close(); } catch (IOException e) { System.out.println("Can't write a dump file: " + e); } System.out.println("Id: " + p.getId()); System.out.println("Jmx: " + p.getJmxServiceUrl()); System.out.println("Main: " + p.getMainClass()); System.out.println("InstanceName: " + p.getInstanceName()); System.out.println("ProccessId: " + p.getProcessId()); System.out.println("BroadcastInterval: " + p.getBroadcastInterval()); System.out.println("Rmi Hostname: " + p.getRmiHostname()); System.out.flush(); } }
Example #19
Source File: PacketTest.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
public void testDefaultEntries() throws IOException { byte[] rawData = createDefaultPacket().getPacketData(); Map<String, String> payload = JdpTestUtil.readPayload(rawData); assertEquals(2, payload.size()); assertEquals(id.toString(), payload.get(JdpJmxPacket.UUID_KEY)); assertEquals(jmxServiceUrl, payload.get(JdpJmxPacket.JMX_SERVICE_URL_KEY)); }
Example #20
Source File: PacketTest.java From hottub with GNU General Public License v2.0 | 5 votes |
public void testDefaultEntries() throws IOException { byte[] rawData = createDefaultPacket().getPacketData(); Map<String, String> payload = JdpTestUtil.readPayload(rawData); assertEquals(2, payload.size()); assertEquals(id.toString(), payload.get(JdpJmxPacket.UUID_KEY)); assertEquals(jmxServiceUrl, payload.get(JdpJmxPacket.JMX_SERVICE_URL_KEY)); }
Example #21
Source File: PacketTest.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
@Test public void testAllEntries() throws IOException { byte[] rawData = createFullPacket().getPacketData(); Map<String, String> payload = JdpTestUtil.readPayload(rawData); assertEquals(4, payload.size()); assertEquals(mainClass, payload.get(JdpJmxPacket.MAIN_CLASS_KEY)); assertEquals(id.toString(), payload.get(JdpJmxPacket.UUID_KEY)); assertEquals(jmxServiceUrl, payload.get(JdpJmxPacket.JMX_SERVICE_URL_KEY)); assertEquals(instanceName, payload.get(JdpJmxPacket.INSTANCE_NAME_KEY)); }
Example #22
Source File: PacketTest.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public void testDefaultEntries() throws IOException { byte[] rawData = createDefaultPacket().getPacketData(); Map<String, String> payload = JdpTestUtil.readPayload(rawData); assertEquals(2, payload.size()); assertEquals(id.toString(), payload.get(JdpJmxPacket.UUID_KEY)); assertEquals(jmxServiceUrl, payload.get(JdpJmxPacket.JMX_SERVICE_URL_KEY)); }
Example #23
Source File: JdpTestCase.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
/** * Assert that this Jdp packet contains the required two keys. * <p/> * We expect zero packet corruption and thus fail on the first corrupted packet. * This might need revision. */ protected Map<String, String> checkStructure(byte[] packet) throws UnsupportedEncodingException { Map<String, String> payload = JdpTestUtil.readPayload(packet); assertTrue(payload.size() >= 2, "JDP should have minimun 2 entries."); assertTrue(payload.get(JdpJmxPacket.UUID_KEY).length() > 0); assertTrue(payload.get(JdpJmxPacket.JMX_SERVICE_URL_KEY).length() > 0); return payload; }
Example #24
Source File: PacketTest.java From openjdk-8 with GNU General Public License v2.0 | 5 votes |
public void testDefaultEntries() throws IOException { byte[] rawData = createDefaultPacket().getPacketData(); Map<String, String> payload = JdpTestUtil.readPayload(rawData); assertEquals(2, payload.size()); assertEquals(id.toString(), payload.get(JdpJmxPacket.UUID_KEY)); assertEquals(jmxServiceUrl, payload.get(JdpJmxPacket.JMX_SERVICE_URL_KEY)); }
Example #25
Source File: PacketTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
public void testDefaultEntries() throws IOException { byte[] rawData = createDefaultPacket().getPacketData(); Map<String, String> payload = JdpTestUtil.readPayload(rawData); assertEquals(2, payload.size()); assertEquals(id.toString(), payload.get(JdpJmxPacket.UUID_KEY)); assertEquals(jmxServiceUrl, payload.get(JdpJmxPacket.JMX_SERVICE_URL_KEY)); }
Example #26
Source File: JdpDoSomething.java From jdk8u_jdk with GNU General Public License v2.0 | 5 votes |
public static void compaireJdpPacketEx(JdpJmxPacket p1, JdpJmxPacket p2) throws JdpException { if (!Objects.equals(p1, p1)) { throw new JdpException("Packet mismatch error"); } if (!Objects.equals(p1.getMainClass(), p2.getMainClass())) { throw new JdpException("Packet mismatch error (main class)"); } if (!Objects.equals(p1.getInstanceName(), p2.getInstanceName())) { throw new JdpException("Packet mismatch error (instance name)"); } }
Example #27
Source File: PacketTest.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
@Test public void testAllEntries() throws IOException { byte[] rawData = createFullPacket().getPacketData(); Map<String, String> payload = JdpTestUtil.readPayload(rawData); assertEquals(4, payload.size()); assertEquals(mainClass, payload.get(JdpJmxPacket.MAIN_CLASS_KEY)); assertEquals(id.toString(), payload.get(JdpJmxPacket.UUID_KEY)); assertEquals(jmxServiceUrl, payload.get(JdpJmxPacket.JMX_SERVICE_URL_KEY)); assertEquals(instanceName, payload.get(JdpJmxPacket.INSTANCE_NAME_KEY)); }
Example #28
Source File: JdpTestCase.java From openjdk-jdk9 with GNU General Public License v2.0 | 5 votes |
/** * Assert that this Jdp packet contains the required two keys. * <p/> * We expect zero packet corruption and thus fail on the first corrupted packet. * This might need revision. */ protected Map<String, String> checkStructure(byte[] packet) throws UnsupportedEncodingException { Map<String, String> payload = JdpTestUtil.readPayload(packet); assertTrue(payload.size() >= 2, "JDP should have minimun 2 entries."); assertTrue(payload.get(JdpJmxPacket.UUID_KEY).length() > 0); assertTrue(payload.get(JdpJmxPacket.JMX_SERVICE_URL_KEY).length() > 0); return payload; }
Example #29
Source File: PacketTest.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 5 votes |
@Test public void testAllEntries() throws IOException { byte[] rawData = createFullPacket().getPacketData(); Map<String, String> payload = JdpTestUtil.readPayload(rawData); assertEquals(4, payload.size()); assertEquals(mainClass, payload.get(JdpJmxPacket.MAIN_CLASS_KEY)); assertEquals(id.toString(), payload.get(JdpJmxPacket.UUID_KEY)); assertEquals(jmxServiceUrl, payload.get(JdpJmxPacket.JMX_SERVICE_URL_KEY)); assertEquals(instanceName, payload.get(JdpJmxPacket.INSTANCE_NAME_KEY)); }
Example #30
Source File: PacketTest.java From jdk8u-jdk with GNU General Public License v2.0 | 5 votes |
public void testDefaultEntries() throws IOException { byte[] rawData = createDefaultPacket().getPacketData(); Map<String, String> payload = JdpTestUtil.readPayload(rawData); assertEquals(2, payload.size()); assertEquals(id.toString(), payload.get(JdpJmxPacket.UUID_KEY)); assertEquals(jmxServiceUrl, payload.get(JdpJmxPacket.JMX_SERVICE_URL_KEY)); }