HttpServerConnection.
| Modifier and Type | Field and Description |
|---|---|
| private final HttpMessageParser | |
| private final HttpMessageWriter |
| Access | Constructor and Description |
|---|---|
| public | DefaultBHttpServerConnection(final int
buffer size. Must be a positive number. bufferSize, final int fragment size hint. fragmentSizeHint, final CharsetDecoder decoder to be used for decoding HTTP protocol elements.
If charDecoder, final CharsetEncoder null simple type cast will be used for byte to char conversion.encoder to be used for encoding HTTP protocol elements.
If charEncoder, final MessageConstraints null simple type cast will be used for char to byte conversion.Message constraints. If constraints, final ContentLengthStrategy null
MessageConstraints#DEFAULT will be used.incoming content length strategy. If incomingContentStrategy, final ContentLengthStrategy null
DisallowIdentityContentLengthStrategy#INSTANCE will be used.outgoing content length strategy. If outgoingContentStrategy, final HttpMessageParserFactory<HttpRequest> null
org. will be used.request parser factory. If requestParserFactory, final HttpMessageWriterFactory<HttpResponse> null
DefaultHttpRequestParserFactory#INSTANCE will be used.response writer factory. If responseWriterFactory)null
DefaultHttpResponseWriterFactory#INSTANCE will be used.Creates new instance of DefaultBHttpServerConnection. |
| public | DefaultBHttpServerConnection(final int bufferSize, final CharsetDecoder charDecoder, final CharsetEncoder charEncoder, final MessageConstraints constraints)
|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | bind(final Socket
the socket. socket)Overrides org. Socket.
|
| public void | flush()
Implements org. |
| protected void | |
| protected void | |
| public void | receiveRequestEntity(final HttpEntityEnclosingRequest
the request to attach the entity to. request)Implements org. |
| public HttpRequest | receiveRequestHeader()
Implements org. |
| public void | sendResponseEntity(final HttpResponse
the response whose entity to send. response)Implements org. |
| public void | sendResponseHeader(final HttpResponse
the response whose headers to send. response)Implements org. |
| requestParser | back to summary |
|---|---|
| private final HttpMessageParser<HttpRequest> requestParser | |
| responseWriter | back to summary |
|---|---|
| private final HttpMessageWriter<HttpResponse> responseWriter | |
| DefaultBHttpServerConnection | back to summary |
|---|---|
| public DefaultBHttpServerConnection(final int bufferSize, final int fragmentSizeHint, final CharsetDecoder charDecoder, final CharsetEncoder charEncoder, final MessageConstraints constraints, final ContentLengthStrategy incomingContentStrategy, final ContentLengthStrategy outgoingContentStrategy, final HttpMessageParserFactory<HttpRequest> requestParserFactory, final HttpMessageWriterFactory<HttpResponse> responseWriterFactory) Creates new instance of DefaultBHttpServerConnection.
| |
| DefaultBHttpServerConnection | back to summary |
|---|---|
| public DefaultBHttpServerConnection(final int bufferSize, final CharsetDecoder charDecoder, final CharsetEncoder charEncoder, final MessageConstraints constraints) | |
| DefaultBHttpServerConnection | back to summary |
|---|---|
| public DefaultBHttpServerConnection(final int bufferSize) | |
| bind | back to summary |
|---|---|
| public void bind(final Socket socket) throws IOException Overrides org. Doc from org. Binds this connection to the given
After this method's execution the connection status will be reported
as open and the
| |
| flush | back to summary |
|---|---|
| public void flush() throws IOException Implements org. Doc from org. Sends all pending buffered data over this connection.
| |
| onRequestReceived | back to summary |
|---|---|
| protected void onRequestReceived(final HttpRequest request) | |
| onResponseSubmitted | back to summary |
|---|---|
| protected void onResponseSubmitted(final HttpResponse response) | |
| receiveRequestEntity | back to summary |
|---|---|
| public void receiveRequestEntity(final HttpEntityEnclosingRequest request) throws HttpException, IOException Implements org. Doc from org. Receives the next request entity available from this connection and attaches it to an existing request.
| |
| receiveRequestHeader | back to summary |
|---|---|
| public HttpRequest receiveRequestHeader() throws HttpException, IOException Implements org. Doc from org. Receives the request line and all headers available from this connection. The caller should examine the returned request and decide if to receive a request entity as well.
| |
| sendResponseEntity | back to summary |
|---|---|
| public void sendResponseEntity(final HttpResponse response) throws HttpException, IOException Implements org. Doc from org. Sends the response entity of a response over this connection.
| |
| sendResponseHeader | back to summary |
|---|---|
| public void sendResponseHeader(final HttpResponse response) throws HttpException, IOException Implements org. Doc from org. Sends the response line and headers of a response over this connection.
| |