APIdia Launch Partner
Top Description Inners Fields Constructors Methods
sun.management.jdp

public final Class JdpController

extends Object
Class Inheritance
Imports
java.io.IOException, java.lang.management.ManagementFactory, .RuntimeMXBean, java.lang.reflect.Field, .Method, java.net.InetAddress, .UnknownHostException, java.util.UUID

JdpController is responsible to create and manage a broadcast loop.

Other part of code has no access to broadcast loop and have to use provided static methods startDiscoveryService and stopDiscoveryService

startDiscoveryService could be called multiple times as it stops the running service if it is necessary. Call to stopDiscoveryService ignored if service isn't run.

System properties below could be used to control broadcast loop behavior. Property below have to be set explicitly in command line. It's not possible to set it in management.config file. Careless changes of these properties could lead to security or network issues.

null parameters values are filtered out on JdpPacketWriter level and corresponding keys are not placed to packet.

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private static JdpController.JDPControllerRunner

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
private static InetAddress
private static int
getInteger(String val, int dflt, String msg)

private static Long
public static synchronized void
startDiscoveryService(InetAddress
- multicast group address
address
,
int
- udp port to use
port
,
String
- name of running JVM instance
instanceName
,
String
- JMX service url
url
)

Starts discovery service

public static synchronized void
stopDiscoveryService()

Stop running discovery service, it's safe to attempt to stop not started service

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

controllerback to summary
private static JdpController.JDPControllerRunner controller

Constructor Detail

JdpControllerback to summary
private JdpController()

Method Detail

getInetAddressback to summary
private static InetAddress getInetAddress(String val, InetAddress dflt, String msg) throws JdpException
getIntegerback to summary
private static int getInteger(String val, int dflt, String msg) throws JdpException
getProcessIdback to summary
private static Long getProcessId()
startDiscoveryServiceback to summary
public static synchronized void startDiscoveryService(InetAddress address, int port, String instanceName, String url) throws IOException, JdpException

Starts discovery service

Parameters
address:InetAddress

- multicast group address

port:int

- udp port to use

instanceName:String

- name of running JVM instance

url:String

- JMX service url

stopDiscoveryServiceback to summary
public static synchronized void stopDiscoveryService()

Stop running discovery service, it's safe to attempt to stop not started service

sun.management.jdp back to summary

private Class JdpController.JDPControllerRunner

extends Object
implements Runnable
Class Inheritance
All Implemented Interfaces
java.lang.Runnable

Field Summary

Modifier and TypeField and Description
private final JdpBroadcaster
private final JdpJmxPacket
private final int
private volatile boolean

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
run()

Implements java.lang.Runnable.run.

Runs this operation.

public void
stop()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

bcastback to summary
private final JdpBroadcaster bcast
packetback to summary
private final JdpJmxPacket packet
pauseback to summary
private final int pause
shutdownback to summary
private volatile boolean shutdown

Constructor Detail

JDPControllerRunnerback to summary
private JDPControllerRunner(JdpBroadcaster bcast, JdpJmxPacket packet, int pause)

Method Detail

runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

Annotations
@Override
stopback to summary
public void stop()