#8228 closed enhancement (fixed)
Add endpoint description to usage page of remote control
Reported by: | simon04 | Owned by: | simon04 |
---|---|---|---|
Priority: | normal | Milestone: | 14.01 |
Component: | Core remotecontrol | Version: | |
Keywords: | Cc: |
Description
I suggest to improve/rework the remote control part in two ways:
- instead of low-level-re-implementing parts of the HTTP protocol, use
com.sun.net.httpserver.HttpServer
- add some usage examples in the code, in order to (hopefully) have all parameters documented, e.g.:
/imagery: adds an imagery layer (e.g. WMS, TMS)) mandatory parameter: url usage examples: /imagery?title=...&type={wms|tms|html|bing|scanex}&url=....[&cookies=...][&min_zoom=...][&max_zoom=...]
This patch is meant for the post-stabilization phase and is open for discussion. (Note: the reverter plugin needs some small adoptions as it provides a remote control handler.)
Attachments (1)
Change History (16)
by , 12 years ago
comment:1 by , 12 years ago
follow-up: 6 comment:2 by , 12 years ago
It's listed in JavaDoc http://docs.oracle.com/javase/6/docs/jre/api/net/httpserver/spec/com/sun/net/httpserver/HttpServer.html and also available in OpenJDK (I'm using 1.7.0_09, OpenJDK Runtime Environment (IcedTea7 2.3.3)).
comment:3 by , 12 years ago
Ok.
I did not look in detail but I'm surprised this patch only contains new lines ? Shouldn't it remove the HTTP reimplemented mechanisms you were talking about ?
comment:4 by , 12 years ago
comment:6 by , 12 years ago
Replying to simon04:
It's listed in JavaDoc http://docs.oracle.com/javase/6/docs/jre/api/net/httpserver/spec/com/sun/net/httpserver/HttpServer.html and also available in OpenJDK (I'm using 1.7.0_09, OpenJDK Runtime Environment (IcedTea7 2.3.3)).
Still, the package com.sun.net.httpserver is only present in the Sun based implementations and not part of the official Java API.
If there is a significant advantage, we can live with it at the moment, but it is better avoid these internal classes.
(There have been tries to run JOSM with GNU Classpath and it even works to some extend, but this is just academic exercise at the moment.)
comment:7 by , 12 years ago
Summary: | [Patch] Improve/rework remote control → [Patch needs rework] Improve/rework remote control |
---|
comment:9 by , 12 years ago
I have added the examples from the patch and wiki, but I am not sure we need descriptions now (there will be many untranslated strings for very specific purpose).
follow-up: 12 comment:10 by , 11 years ago
Actually, we don't i18n the remote control usage page at all, do we?
comment:11 by , 11 years ago
Summary: | [Patch needs rework] Improve/rework remote control → Add endpoint description to usage page of remote control |
---|
comment:12 by , 11 years ago
Replying to simon04:
Actually, we don't i18n the remote control usage page at all, do we?
What do you mean?
comment:13 by , 11 years ago
Currently, the strings from getUsageAsHtml
are not being translated, e.g., "optional parameters". Therefore, we could also show untranslated descriptions …
comment:15 by , 11 years ago
Milestone: | → 14.01 |
---|
Replying to simon04:
Is it safe to use this class in
com.sun
package ?