public class LoggingCorsHttpServer extends CorsHttpServer
HttpServer.Handler, HttpServer.Request, HttpServer.Response
EXTRAHOSTS_PROP
HDR_CONTENT_TYPE, STATUS_OK
Constructor and Description |
---|
LoggingCorsHttpServer(ServerSocket socket,
OriginAuthorizer auth,
PrintStream out)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
HttpServer.Response |
serve(HttpServer.Request request)
Does the work for providing output corresponding to a given HTTP request.
|
createNonLocalErrorResponse, isExtraHost, isLocalHost, isPermittedHost
addHandler, create405Response, createErrorResponse, createErrorResponse, getBaseUrl, getHeader, getSocket, isRunning, removeHandler, serveRequest, setDaemon, start, stop
public LoggingCorsHttpServer(ServerSocket socket, OriginAuthorizer auth, PrintStream out) throws IOException
socket
- socket hosting the serviceauth
- defines which domains requests will be permitted fromout
- destination stream for loggingIOException
public HttpServer.Response serve(HttpServer.Request request)
HttpServer
serve
in class CorsHttpServer
request
- represents an HTTP request that has been receivedCopyright © 2008–2024. All rights reserved.