|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xlightweb.AbstractHttpConnection
org.xlightweb.server.HttpServerConnection
public final class HttpServerConnection
Represents the server side endpoint implementation of a http connection. Typically, a
HttpServerConnection will be created by the HttpProtocolAdapter
which is used
internally by the HttpServer
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.xlightweb.AbstractHttpConnection |
---|
org.xlightweb.AbstractHttpConnection.AbstractExchange, org.xlightweb.AbstractHttpConnection.IMessageHandler, org.xlightweb.AbstractHttpConnection.IMessageHeaderHandler, org.xlightweb.AbstractHttpConnection.IMultimodeExecutor, org.xlightweb.AbstractHttpConnection.RequestHandlerAdapter, org.xlightweb.AbstractHttpConnection.ResponseHandlerAdapter |
Nested classes/interfaces inherited from interface org.xsocket.connection.IConnection |
---|
IConnection.FlushMode |
Field Summary | |
---|---|
static boolean |
DEFAULT_AUTOHANDLE_CONNECTION_UPGRADE_HEADER
|
static Integer |
DEFAULT_RECEIVE_TIMEOUT_MILLIS
|
static boolean |
DEFAULT_REMOVE_REQUEST_CONNECTION_HEADER
|
static boolean |
DEFAULT_SESSION_MANAGEMENT
|
Fields inherited from interface org.xlightweb.IHttpConnection |
---|
DEFAULT_CONNECT_TIMEOUT_MILLIS, DEFAULT_DATA_RESPONSE_TIMEOUT_MILLIS, DEFAULT_RESPONSE_TIMEOUT_MILLIS |
Fields inherited from interface org.xsocket.connection.IConnection |
---|
DEFAULT_AUTOFLUSH, DEFAULT_CONNECTION_TIMEOUT_MILLIS, DEFAULT_FLUSH_MODE, DEFAULT_IDLE_TIMEOUT_MILLIS, INITIAL_DEFAULT_ENCODING, MAX_TIMEOUT_MILLIS, SO_KEEPALIVE, SO_LINGER, SO_RCVBUF, SO_REUSEADDR, SO_SNDBUF, SO_TIMEOUT, TCP_NODELAY |
Method Summary | |
---|---|
protected org.xlightweb.AbstractHttpConnection.IMessageHeaderHandler |
getMessageHeaderHandler()
|
protected static int |
getSizeDataReceived(NonBlockingBodyDataSource body)
|
protected static int |
getSizeWritten(BodyDataSink body)
|
boolean |
isServerSide()
|
protected void |
onDisconnect()
|
protected void |
onMessageWritten()
|
protected void |
onProtocolException(Exception ex)
|
protected static void |
schedule(TimerTask task,
long delay,
long period)
schedules the task |
void |
setMaxTransactions(int maxTransactions)
set the max transactions per connection. |
void |
setRequestBodyDefaultEncoding(String defaultEncoding)
set the request body default encoding. |
void |
setRequestTimeoutMillis(long requestTimeoutMillis)
set the max receive timeout which is accepted for the connection. |
Methods inherited from class org.xlightweb.AbstractHttpConnection |
---|
activateSecuredMode, addConnectionHandler, availableSilence, close, closeQuitly, destroy, destroy, destroy, destroy, forward, forwardBody, generateErrorMessageHtml, getAttachment, getBodyDataReceiveTimeoutMillis, getConnectionTimeoutMillis, getCountMessagesReceived, getCountMessagesSent, getCountReceivedBytes, getDataHandlerSilence, getDataReceived, getDataSourceOfInMemoryBodyDataSink, getExecutor, getId, getIdleTimeoutMillis, getLastTimeDataReceivedMillis, getLastTimeHeaderReceivedMillis, getLastTimeMessageTailReceivedMillis, getLastTimeWritten, getLocalAddress, getLocalPort, getMaxWriteBufferSize, getNumOpenTransactions, getOption, getOptions, getReceviedHeader, getRemainingMillisToConnectionTimeout, getRemainingMillisToIdleTimeout, getRemoteAddress, getRemotePort, getUnderlyingTcpConnection, getWorkerpool, incCountMessageReceived, incCountMessageSent, init, isAcceptingChunkedResponseBody, isAutoUncompress, isComplete, isContentTypeSupportsCharset, isEmpty, isForwardable, isNetworkendpoint, isOpen, isPersistent, isReceivingSuspended, isReuseable, isSecure, isSupports100Contine, newDetailedClosedChannelException, newDoNothingResponseHandler, newEmtpyBodyDataSink, newFormEncodedRequestWrapper, newInMemoryBodyDataSink, newMultimodeExecutor, onConnect, onConnectionTimeout, onIdleTimeout, onMessageCompleteReceived, parseEncoding, readByteBufferByLengthSilence, removeConnectionHandler, resumeReceiving, schedule, setAttachment, setAutocompressThreshold, setAutoUncompress, setBodyCloseListener, setBodyDataReceiveTimeoutMillis, setBodyDefaultEncoding, setConnectionTimeoutMillis, setDataHandlerSilence, setIdleTimeoutMillis, setLastTimeDataReceivedMillis, setLastTimeHeaderReceivedMillis, setLastTimeMessageTailReceivedMillis, setNetworkBodyDataSinkIgnoreWriteError, setOption, setPersistent, setWorkerpool, setWriteTransferRate, suspendReceiving, toString, writeMessage, writeMessage, writeMessage, writeMessageSilence |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final boolean DEFAULT_REMOVE_REQUEST_CONNECTION_HEADER
public static final Integer DEFAULT_RECEIVE_TIMEOUT_MILLIS
public static final boolean DEFAULT_AUTOHANDLE_CONNECTION_UPGRADE_HEADER
public static final boolean DEFAULT_SESSION_MANAGEMENT
Method Detail |
---|
public boolean isServerSide()
public void setMaxTransactions(int maxTransactions)
maxTransactions
- the max transactionspublic void setRequestBodyDefaultEncoding(String defaultEncoding)
encoding
- the defaultEncodingprotected static void schedule(TimerTask task, long delay, long period)
task
- the task to scheduledelay
- the delayperiod
- the periodprotected static int getSizeDataReceived(NonBlockingBodyDataSource body)
protected static int getSizeWritten(BodyDataSink body)
public void setRequestTimeoutMillis(long requestTimeoutMillis)
requestTimout
- the timeoutprotected void onProtocolException(Exception ex)
onProtocolException
in class org.xlightweb.AbstractHttpConnection
protected void onMessageWritten()
onMessageWritten
in class org.xlightweb.AbstractHttpConnection
protected org.xlightweb.AbstractHttpConnection.IMessageHeaderHandler getMessageHeaderHandler()
getMessageHeaderHandler
in class org.xlightweb.AbstractHttpConnection
protected void onDisconnect()
onDisconnect
in class org.xlightweb.AbstractHttpConnection
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |