Package org.apache.http.nio
Interface NHttpServerConnection
- 
- All Superinterfaces:
 java.lang.AutoCloseable,java.io.Closeable,HttpConnection,IOControl,NHttpConnection
- All Known Subinterfaces:
 NHttpServerIOTarget
- All Known Implementing Classes:
 DefaultNHttpServerConnection
public interface NHttpServerConnection extends NHttpConnection
Abstract non-blocking server-side HTTP connection interface. It can be used to receive HTTP requests and asynchronously submit HTTP responses.- Since:
 - 4.0
 - See Also:
 NHttpConnection
 
- 
- 
Field Summary
- 
Fields inherited from interface org.apache.http.nio.NHttpConnection
ACTIVE, CLOSED, CLOSING 
 - 
 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanisResponseSubmitted()Returnstrueif an HTTP response has been submitted to the client.voidresetInput()Resets output state.voidresetOutput()Resets input state.voidsubmitResponse(HttpResponse response)Submits {link @HttpResponse} to be sent to the client.- 
Methods inherited from interface org.apache.http.HttpConnection
close, getMetrics, getSocketTimeout, isOpen, isStale, setSocketTimeout, shutdown 
- 
Methods inherited from interface org.apache.http.nio.IOControl
requestInput, requestOutput, shutdown, suspendInput, suspendOutput 
- 
Methods inherited from interface org.apache.http.nio.NHttpConnection
getContext, getHttpRequest, getHttpResponse, getStatus 
 - 
 
 - 
 
- 
- 
Method Detail
- 
submitResponse
void submitResponse(HttpResponse response) throws java.io.IOException, HttpException
Submits {link @HttpResponse} to be sent to the client.- Parameters:
 response- HTTP response- Throws:
 java.io.IOException- if I/O error occurs while submitting the responseHttpException- if the HTTP response violates the HTTP protocol.
 
- 
isResponseSubmitted
boolean isResponseSubmitted()
Returnstrueif an HTTP response has been submitted to the client.- Returns:
 trueif an HTTP response has been submitted,falseotherwise.
 
- 
resetInput
void resetInput()
Resets output state. This method can be used to prematurely terminate processing of the incoming HTTP request. 
- 
resetOutput
void resetOutput()
Resets input state. This method can be used to prematurely terminate processing of the outgoing HTTP response. 
 - 
 
 -