public interface

NHttpServerConnection

implements NHttpConnection
org.apache.http.nio.NHttpServerConnection
Known Indirect Subclasses

Class Overview

Abstract non-blocking server-side HTTP connection interface. It can be used to receive HTTP requests and asynchronously submit HTTP responses.

See Also

Summary

[Expand]
Inherited Constants
From interface org.apache.http.nio.NHttpConnection
Public Methods
abstract boolean isResponseSubmitted()
Returns true if an HTTP response has been submitted to the client.
abstract void resetInput()
Resets output state.
abstract void resetOutput()
Resets input state.
abstract void submitResponse(HttpResponse response)
Submits {link @HttpResponse} to be sent to the client.
[Expand]
Inherited Methods
From interface org.apache.http.HttpConnection
From interface org.apache.http.nio.IOControl
From interface org.apache.http.nio.NHttpConnection

Public Methods

public abstract boolean isResponseSubmitted ()

Returns true if an HTTP response has been submitted to the client.

Returns
  • true if an HTTP response has been submitted, false otherwise.

public abstract void resetInput ()

Resets output state. This method can be used to prematurely terminate processing of the incoming HTTP request.

public abstract void resetOutput ()

Resets input state. This method can be used to prematurely terminate processing of the outgoing HTTP response.

public abstract void submitResponse (HttpResponse response)

Submits {link @HttpResponse} to be sent to the client.

Parameters
response HTTP response
Throws
IOException if I/O error occurs while submitting the response
HttpException if the HTTP response violates the HTTP protocol.