Class RemoteControl
java.lang.Object
org.openstreetmap.josm.io.remotecontrol.RemoteControl
Manager class for remote control operations.
IMPORTANT! increment the minor version on compatible API extensions
and increment the major version and set minor to 0 on incompatible changes.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final BooleanPropertyIf the remote control feature is enabled or disabled.(package private) static final intRemoteControl HTTP protocol version.(package private) static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRequestHandler(String command, Class<? extends RequestHandler> handlerClass) Adds external request handler.static InetAddressReturns the IPv4 address used for remote control.static InetAddressReturns the IPv6 address used for remote control.static StringReturns the remote control directory.static StringReturns the RemoteControl HTTP protocol versionstatic voidstart()Starts the remote control serverstatic voidstop()Stops the remote control server
-
Field Details
-
PROP_REMOTECONTROL_ENABLED
If the remote control feature is enabled or disabled. If disabled, it should not start the server. -
protocolMajorVersion
RemoteControl HTTP protocol version. Change minor number for compatible interface extensions. Change major number in case of incompatible changes.- See Also:
-
protocolMinorVersion
- See Also:
-
-
Constructor Details
-
RemoteControl
public RemoteControl()
-
-
Method Details
-
start
Starts the remote control server -
stop
Stops the remote control server- Since:
- 5861
-
addRequestHandler
Adds external request handler. Can be used by plugins that want to use remote control.- Parameters:
command- The command name.handlerClass- The additional request handler.
-
getRemoteControlDir
Returns the remote control directory.- Returns:
- The remote control directory
- Since:
- 7335
-
getInet6Address
Returns the IPv6 address used for remote control.- Returns:
- the IPv6 address used for remote control
- Throws:
UnknownHostException- if the local host name could not be resolved into an address.- Since:
- 8337
-
getInet4Address
Returns the IPv4 address used for remote control.- Returns:
- the IPv4 address used for remote control
- Throws:
UnknownHostException- if the local host name could not be resolved into an address.- Since:
- 8337
-
getVersion
Returns the RemoteControl HTTP protocol version- Returns:
- the RemoteControl HTTP protocol version
-