com.bigdata.counters.httpd
Class CounterSetHTTPD

java.lang.Object
  extended by com.bigdata.util.httpd.NanoHTTPD
      extended by com.bigdata.util.httpd.AbstractHTTPD
          extended by com.bigdata.counters.httpd.CounterSetHTTPD
All Implemented Interfaces:
IServiceShutdown, HTTPGetHandler

public class CounterSetHTTPD
extends AbstractHTTPD

Exposes a CounterSet via HTTPD.

Version:
$Id: CounterSetHTTPD.java 4397 2011-04-13 20:33:10Z thompsonbry $
Author:
Bryan Thompson

Nested Class Summary
 
Nested classes/interfaces inherited from class com.bigdata.util.httpd.NanoHTTPD
NanoHTTPD.Request, NanoHTTPD.Response
 
Nested classes/interfaces inherited from interface com.bigdata.service.IServiceShutdown
IServiceShutdown.Options
 
Field Summary
 
Fields inherited from class com.bigdata.util.httpd.NanoHTTPD
CONTENT_LENGTH, CONTENT_TYPE, DATE, DELETE, ERR_BAD_REQUEST, GET, HTTP_BADREQUEST, HTTP_FORBIDDEN, HTTP_INTERNALERROR, HTTP_METHOD_NOT_ALLOWED, HTTP_NOTFOUND, HTTP_NOTIMPLEMENTED, HTTP_OK, HTTP_REDIRECT, httpDefaultCharacterEncoding, MIME_APPLICATION_URL_ENCODED, MIME_APPLICATION_XML, MIME_DEFAULT_BINARY, MIME_TEXT_HTML, MIME_TEXT_JAVASCRIPT, MIME_TEXT_PLAIN, POST, PUT, UTF8
 
Constructor Summary
CounterSetHTTPD(int port, ICounterSetAccess accessor)
           
CounterSetHTTPD(int port, ICounterSetAccess accessor, IService service)
           
 
Method Summary
 NanoHTTPD.Response doGet(NanoHTTPD.Request req)
          Handle a GET request.
protected  IService getService()
          The service reference iff one one specified to the ctor (may be null).
 
Methods inherited from class com.bigdata.util.httpd.AbstractHTTPD
doDelete, doPost, doPut, serve
 
Methods inherited from class com.bigdata.util.httpd.NanoHTTPD
decodeParams, encodeParams, getPort, isOpen, main, serveFile, shutdown, shutdownNow
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CounterSetHTTPD

public CounterSetHTTPD(int port,
                       ICounterSetAccess accessor)
                throws IOException
Throws:
IOException

CounterSetHTTPD

public CounterSetHTTPD(int port,
                       ICounterSetAccess accessor,
                       IService service)
                throws IOException
Parameters:
port -
accessor -
service - Optional reference to the service within which this httpd is hosted.
Throws:
IOException
Method Detail

getService

protected final IService getService()
The service reference iff one one specified to the ctor (may be null).


doGet

public NanoHTTPD.Response doGet(NanoHTTPD.Request req)
                         throws Exception
Description copied from class: AbstractHTTPD
Handle a GET request.

Specified by:
doGet in interface HTTPGetHandler
Overrides:
doGet in class AbstractHTTPD
Parameters:
req - The request
Returns:
The response.
Throws:
Exception
See Also:
NanoHTTPD.Response


Copyright © 2006-2011 SYSTAP, LLC. All Rights Reserved.