|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.jini.jeri.internal.http.HttpServerConnection
public abstract class HttpServerConnection
Class representing a server-side HTTP connection used to receive and dispatch incoming HTTP requests.
Nested Class Summary | |
---|---|
private class |
HttpServerConnection.Dispatcher
Incoming request dispatcher. |
private class |
HttpServerConnection.InboundRequestImpl
HTTP-based implementation of InboundRequest abstraction. |
Field Summary | |
---|---|
private static int |
BUSY
|
private static int |
CLOSED
|
private RequestDispatcher |
dispatcher
|
private static int |
HTTP_MAJOR
|
private static int |
HTTP_MINOR
|
private static int |
IDLE
|
private InputStream |
in
|
private HttpServerManager |
manager
|
private OutputStream |
out
|
private static String |
serverString
|
private Socket |
sock
|
private int |
state
|
private Object |
stateLock
|
private static int |
UNSTARTED
|
private static Executor |
userThreadPool
|
Constructor Summary | |
---|---|
HttpServerConnection(Socket sock,
RequestDispatcher dispatcher,
HttpServerManager manager)
Creates new HttpServerConnection on top of given socket. |
Method Summary | |
---|---|
protected void |
busy()
Upcall indicating that connection is about to become busy. |
protected InvocationConstraints |
checkConstraints(InvocationConstraints constraints)
Checks that the specified requirements are either fully or partially satisfied by the constraints actually in force for this connection, and returns any constraints that must be fully or partially implemented by higher layers in order to fully satisfy all of the specified requirements. |
protected void |
checkPermissions()
Verifies that calling context has sufficient security permissions to receive a request on this connection. |
private static Header |
createResponseHeader(boolean persist)
Creates base header to be used in response message. |
protected void |
idle()
Upcall indicating that connection has become idle. |
protected abstract void |
populateContext(Collection context)
Populates the given context collection with context information representing this connection. |
private void |
registerAcks(String ackList)
Notifies listeners for response ack cookies parsed from (possibly null) comma-separated cookie list string. |
boolean |
shutdown(boolean force)
Attempts to shut down connection, returning true if connection is closed. |
protected void |
start()
Starts request dispatch thread. |
private static boolean |
supportsChunking(StartLine sline,
Header header)
Returns true if the received message start line indicates that the sender understands chunked transfer coding. |
private static boolean |
supportsPersist(StartLine sline,
Header header)
Returns true if the received message start line and header indicate that the connection can be persisted. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int HTTP_MAJOR
private static final int HTTP_MINOR
private static final int UNSTARTED
private static final int IDLE
private static final int BUSY
private static final int CLOSED
private static final String serverString
private static final Executor userThreadPool
private final Socket sock
private final InputStream in
private final OutputStream out
private final RequestDispatcher dispatcher
private final HttpServerManager manager
private final Object stateLock
private int state
Constructor Detail |
---|
public HttpServerConnection(Socket sock, RequestDispatcher dispatcher, HttpServerManager manager) throws IOException
IOException
Method Detail |
---|
protected void start()
protected void checkPermissions()
protected InvocationConstraints checkConstraints(InvocationConstraints constraints) throws UnsupportedConstraintException
UnsupportedConstraintException
protected abstract void populateContext(Collection context)
protected void idle()
protected void busy()
public boolean shutdown(boolean force)
shutdown
in interface TimedConnection
private void registerAcks(String ackList)
private static boolean supportsPersist(StartLine sline, Header header)
private static boolean supportsChunking(StartLine sline, Header header)
private static Header createResponseHeader(boolean persist)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |