public class SimpleWSNConsumer extends NanoHTTPD implements IWSNConsumer
NanoHTTPD.Response
HTTP_BADREQUEST, HTTP_FORBIDDEN, HTTP_INTERNALERROR, HTTP_NOTFOUND, HTTP_NOTIMPLEMENTED, HTTP_NOTMODIFIED, HTTP_OK, HTTP_PARTIALCONTENT, HTTP_RANGE_NOT_SATISFIABLE, HTTP_REDIRECT, logger, MIME_DEFAULT_BINARY, MIME_HTML, MIME_PLAINTEXT, MIME_XML, myOut, POST_BODY
Constructor and Description |
---|
SimpleWSNConsumer(int port,
String publicUrl) |
SimpleWSNConsumer(int port,
String publicUrl,
File wwwroot,
HttpListener l) |
Modifier and Type | Method and Description |
---|---|
URL |
getPublicURL() |
static void |
main(String[] args) |
protected NanoHTTPD.Response |
serve(String uri,
String method,
Properties header,
Properties parms,
Properties files) |
void |
setListener(HttpListener listener) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
stop
public SimpleWSNConsumer(int port, String publicUrl) throws IOException, InterruptedException
IOException
InterruptedException
public SimpleWSNConsumer(int port, String publicUrl, File wwwroot, HttpListener l) throws IOException, InterruptedException
IOException
InterruptedException
protected NanoHTTPD.Response serve(String uri, String method, Properties header, Properties parms, Properties files)
public void setListener(HttpListener listener)
setListener
in interface IWSNConsumer
listener
- the request listenerpublic URL getPublicURL()
getPublicURL
in interface IWSNConsumer
public static void main(String[] args)
Copyright © 2012–2017 52North Initiative for Geospatial Open Source Software GmbH. All rights reserved.