public interface HttpListener extends LifeCycle, Serializable
HttpConnection
,
HttpServer
Modifier and Type | Method and Description |
---|---|
void |
customizeRequest(HttpConnection connection,
HttpRequest request)
Customize a request for a listener/connection combination.
|
int |
getBufferReserve()
Get the size of the header reserve area.
|
int |
getBufferSize()
Get the size of the buffers used by connections from this listener.
|
int |
getConfidentialPort()
Get the protocol port to use for confidential redirections.
|
String |
getConfidentialScheme()
Get the protocol scheme to use for confidential redirections.
|
String |
getDefaultScheme()
Get the default scheme for requests.
|
String |
getHost()
Get the host or IP of the interface used by this listener.
|
HttpHandler |
getHttpHandler()
Get an optional HttpHandler for the listener.
|
HttpServer |
getHttpServer()
Get the HttpServer instance for this HttpListener.
|
int |
getIntegralPort()
Get the protocol port to use for integral redirections.
|
String |
getIntegralScheme()
Get the protocol scheme to use for integral redirections.
|
int |
getPort()
Get the port number of the listener.
|
boolean |
isConfidential(HttpConnection connection)
Get the confidential status of a connection.
|
boolean |
isIntegral(HttpConnection connection)
Get the integral status of a connection.
|
boolean |
isLowOnResources()
Get the low on resources state of the listener.
|
boolean |
isOutOfResources()
Get the out of resources state of the listener.
|
void |
persistConnection(HttpConnection connection)
Prepare a connection for persistance.
|
void |
setHost(String host)
Set the host or IP of the interface used by this listener.
|
void |
setHttpServer(HttpServer server)
Set the HttpServer instance for this HttpListener.
|
void |
setPort(int port)
Set the port number of the listener.
|
static final String ATTRIBUTE
void setHttpServer(HttpServer server)
server
- The HttpServer instance this HttpListener has been added to.HttpServer getHttpServer()
void setHost(String host) throws UnknownHostException
host
- The hostname or IP address of the interface used by this
listeners. If null or "0.0.0.0" then all available interfaces are used
by this listener.UnknownHostException
String getHost()
void setPort(int port)
port
- The TCP/IP port number to be used by this listener.int getPort()
int getBufferSize()
int getBufferReserve()
String getDefaultScheme()
void customizeRequest(HttpConnection connection, HttpRequest request)
connection
- The connection the request was received on, which must
be a HttpConnection created by this listener.request
- The request to customize.void persistConnection(HttpConnection connection)
connection
- The perstent connection, which must be a
HttpConnection created by this listener.boolean isLowOnResources()
boolean isOutOfResources()
boolean isIntegral(HttpConnection connection)
connection
- The connection to test.String getIntegralScheme()
int getIntegralPort()
boolean isConfidential(HttpConnection connection)
connection
- The connection to test.String getConfidentialScheme()
int getConfidentialPort()
HttpHandler getHttpHandler()
Copyright © 2013. All Rights Reserved.