|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bbn.openmap.image.SimpleHttpImageServer
public class SimpleHttpImageServer
The SimpleHttpImageServer is an ImageServer extended into a simple Http server that creates images based on arguments within the request. The Request has been modeled after the OpenGIS WMT map request, although it has to be noted that this server is not yet a OGC WMT-compliant server.
To see the parameters available to run this class, launch the server with:
java com.bbn.openmap.image.SimpleHttpImageServer -helpThe server takes two main arguments, a properties file, and a port number to run on. The properties file is a standard ImageServer openmap.properties file, and its format is described in the ImageServer documentation.
The request format can be seen by pointing a browser at the port and host that the server is running on. It basically follows the format:
http://host:port/openmap?REQUEST=map&PROJTYPE=projtype&SCALE=XXXXXXXX&(etc)
This SimpleHttpImageServer is expecting a properties file containing the "layers" and "formatters" properties, both without a prefix. i.e:
layers=markername1 markername2 markername3 formatters=formatter1 formatter2 markername1.class # other markername1 properties follow... formatter1.class # other formatter1 properties follow...
If the 'layers' property is not defined the openmap.properties file, then the 'openmap.layers' property will be used, and the 'openmap.startUpLayers' property will be used to define the default set of layers. This lets there be more layers available to the client than would be sent by default (if the client doesn't specify layers).
ImageServer
Field Summary | |
---|---|
static java.lang.String |
ErrorMessage
|
protected HttpServer |
httpd
|
protected MapRequestHandler |
iServer
|
static char |
queryChar
|
Constructor Summary | |
---|---|
SimpleHttpImageServer(int port,
boolean asDeamon,
java.util.Properties props)
|
|
SimpleHttpImageServer(java.util.Properties props)
|
Method Summary | |
---|---|
MapRequestHandler |
getMapRequestHandler()
Get the MapRequestHandler that is handling map image requests. |
void |
httpRequest(HttpRequestEvent e)
Invoked when an http request is received. |
static void |
main(java.lang.String[] args)
|
void |
setMapRequestHandler(MapRequestHandler mrh)
If you want to configure the MapRequestHandler and set it in the SHIS, you can use this method. |
void |
start()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected HttpServer httpd
protected MapRequestHandler iServer
public static final java.lang.String ErrorMessage
public static final char queryChar
Constructor Detail |
---|
public SimpleHttpImageServer(java.util.Properties props) throws java.io.IOException
java.io.IOException
public SimpleHttpImageServer(int port, boolean asDeamon, java.util.Properties props) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public void start()
public MapRequestHandler getMapRequestHandler()
public void setMapRequestHandler(MapRequestHandler mrh)
public void httpRequest(HttpRequestEvent e) throws java.io.IOException
httpRequest
in interface HttpRequestListener
java.io.IOException
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |