|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.felix.httplite.server.Connection
public class Connection
This class represents an accepted connection between the server and a client. It supports persistent connections for both HTTP 1.0 and 1.1 clients. A given persistent connection is limited in the number of consecutive requests it is allowed to make before having its connection closed as well as after a period of inactivity.
| Field Summary | |
|---|---|
static int |
DEFAULT_CONNECTION_REQUESTLIMIT
Requests per request |
static int |
DEFAULT_CONNECTION_TIMEOUT
Connection timeout |
| Constructor Summary | |
|---|---|
Connection(java.net.Socket socket,
int timeout,
int requestLimit,
ServiceRegistrationResolver resolver,
Logger logger)
Constructs a connection with the specified inactivity timeout and request limit. |
|
Connection(java.net.Socket socket,
ServiceRegistrationResolver resolver,
Logger logger)
Constructs a connection with a default inactivity timeout and request limit. |
|
| Method Summary | |
|---|---|
void |
process()
Performs the actual servicing of the connection and its subsequent requests. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_CONNECTION_TIMEOUT
public static final int DEFAULT_CONNECTION_REQUESTLIMIT
| Constructor Detail |
|---|
public Connection(java.net.Socket socket,
ServiceRegistrationResolver resolver,
Logger logger)
throws java.io.IOException
socket - Socket connectionresolver - a resolver to get http request/response and handler.logger - Logger
java.io.IOException - If any I/O error occurs.
public Connection(java.net.Socket socket,
int timeout,
int requestLimit,
ServiceRegistrationResolver resolver,
Logger logger)
throws java.io.IOException
socket - The client socket.timeout - The inactivity timeout of the connection in milliseconds.requestLimit - The maximum number of consecutive requests.resolver - resolves a request URI to a client or servlet registration via the HTTP Service.logger - logger instance.
java.io.IOException - If any I/O error occurs.| Method Detail |
|---|
public void process()
throws java.io.IOException,
javax.servlet.ServletException
java.net.SocketTimeoutException - If the inactivity timeout expired
while trying to read from the socket.
java.io.IOException - If any I/O error occurs.
javax.servlet.ServletException - on servlet errors
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||