public class RemoteControl extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static BooleanProperty |
PROP_REMOTECONTROL_ENABLED
If the remote control feature is enabled or disabled.
|
static BooleanProperty |
PROP_REMOTECONTROL_HTTPS_ENABLED
If the remote control feature is enabled or disabled for HTTPS.
|
(package private) static int |
protocolMajorVersion
RemoteControl HTTP protocol version.
|
(package private) static int |
protocolMinorVersion |
Constructor and Description |
---|
RemoteControl() |
Modifier and Type | Method and Description |
---|---|
void |
addRequestHandler(java.lang.String command,
java.lang.Class<? extends RequestHandler> handlerClass)
Adds external request handler.
|
static java.net.InetAddress |
getInet4Address()
Returns the IPv4 address used for remote control.
|
static java.net.InetAddress |
getInet6Address()
Returns the IPv6 address used for remote control.
|
static java.lang.String |
getRemoteControlDir()
Returns the remote control directory.
|
static void |
start()
Starts the remote control server
|
static void |
stop()
Stops the remote control server
|
static boolean |
supportsHttps()
Determines if the current JVM support HTTPS remote control.
|
public static final BooleanProperty PROP_REMOTECONTROL_ENABLED
public static final BooleanProperty PROP_REMOTECONTROL_HTTPS_ENABLED
static final int protocolMajorVersion
static final int protocolMinorVersion
public RemoteControl()
public static void start()
public static void stop()
public static boolean supportsHttps()
true
if the JVM provides sun.security.x509
classespublic void addRequestHandler(java.lang.String command, java.lang.Class<? extends RequestHandler> handlerClass)
command
- The command name.handlerClass
- The additional request handler.public static java.lang.String getRemoteControlDir()
public static java.net.InetAddress getInet6Address() throws java.net.UnknownHostException
java.net.UnknownHostException
- if the local host name could not be resolved into an address.public static java.net.InetAddress getInet4Address() throws java.net.UnknownHostException
java.net.UnknownHostException
- if the local host name could not be resolved into an address.