|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.abstracthorizon.danube.service.server.ServerConnectionHandler org.abstracthorizon.danube.http.HTTPServerConnectionHandler
public class HTTPServerConnectionHandler
This class is entry point for HTTP server.
It extends Selector
class adding
"Server" header and handles HTTP/1.1 "Connection: keep-alive"
(multiple requests over singe socket connection.
Field Summary | |
---|---|
static SimpleDateFormat |
DATE_FORMAT
RFC822 date format |
static int |
DEFAULT_BUFFER_SIZE
Default buffer size of 8Kb |
protected int |
defaultBufferSize
Default buffer size |
protected ConnectionHandler |
errorHandler
Error handler |
static String |
FULL_VERSION_STRING
Full version string |
static String |
VERSION_STRING
Version string |
Fields inherited from class org.abstracthorizon.danube.service.server.ServerConnectionHandler |
---|
connectionHandler, logger |
Constructor Summary | |
---|---|
HTTPServerConnectionHandler()
Constructor |
Method Summary | |
---|---|
protected Connection |
decorateConnection(Connection connection)
This method can "decorate" connection wrapping it with own. |
protected void |
finishConnection(Connection connnection)
|
int |
getDefaultBufferSize()
Returns default buffer size |
ConnectionHandler |
getErrorHandler()
Returns generic error handler |
protected boolean |
postProcessing(Connection connection,
boolean persistConnection)
|
protected void |
processConnection(Connection connection)
Processes connection |
void |
setDefaultBufferSize(int defaultBufferSize)
Sets default buffer size |
void |
setErrorHandler(ConnectionHandler errorHandler)
Sets generic error handler |
Methods inherited from class org.abstracthorizon.danube.service.server.ServerConnectionHandler |
---|
closeConnection, finishProcessingConnection, getConnectionHandler, handleConnection, postProcessing, setConnectionHandler |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String VERSION_STRING
public static final String FULL_VERSION_STRING
public static final SimpleDateFormat DATE_FORMAT
public static final int DEFAULT_BUFFER_SIZE
protected ConnectionHandler errorHandler
protected int defaultBufferSize
Constructor Detail |
---|
public HTTPServerConnectionHandler()
Method Detail |
---|
public ConnectionHandler getErrorHandler()
public void setErrorHandler(ConnectionHandler errorHandler)
errorHandler
- generic error handlerpublic int getDefaultBufferSize()
public void setDefaultBufferSize(int defaultBufferSize)
defaultBufferSize
- default buffer sizeprotected void processConnection(Connection connection)
processConnection
in class ServerConnectionHandler
httpConnection
- http connection to be processed
IOException
protected Connection decorateConnection(Connection connection)
ServerConnectionHandler
decorateConnection
in class ServerConnectionHandler
connection
- original conneciton
protected boolean postProcessing(Connection connection, boolean persistConnection)
protected void finishConnection(Connection connnection)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |