public abstract class HttpServer extends Object
Constructor and Description |
---|
HttpServer(String hostName,
int port,
KeyManager[] keyManagers) |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
executeRequest(HttpServerRequest request) |
String |
getHostName() |
int |
getPort() |
protected void |
onCreateExecutionThreadForRequestException(Exception e) |
protected void |
onCreateExecutionThreadForRequestException(int httpResponseCode,
String message) |
protected void |
onCreateRequestForSocketException(Exception e) |
protected void |
onExecuteRequestException(Exception e,
HttpServerRequest header) |
protected void |
onListenForRequestException(Exception e) |
protected void |
onWriteServiceUnavailableResponseException(Exception e) |
void |
setAvailable(boolean isAvailable) |
void |
start(ScheduledThreadPoolExecutor executor) |
void |
stop() |
public HttpServer(String hostName, int port, KeyManager[] keyManagers)
public String getHostName()
public int getPort()
public void start(ScheduledThreadPoolExecutor executor) throws IOException, NoSuchAlgorithmException, KeyManagementException
public void setAvailable(boolean isAvailable)
public void stop() throws IOException
IOException
protected abstract void executeRequest(HttpServerRequest request)
protected void onListenForRequestException(Exception e)
protected void onCreateExecutionThreadForRequestException(int httpResponseCode, String message)
protected void onCreateExecutionThreadForRequestException(Exception e)
protected void onWriteServiceUnavailableResponseException(Exception e)
protected void onCreateRequestForSocketException(Exception e)
protected void onExecuteRequestException(Exception e, HttpServerRequest header)
Copyright © 2013. All Rights Reserved.