public interface HttpServer
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes and releases any open connections or resources
used by this server.
|
OutputStream |
getOutputStream()
Returns a stream for writing data to, if data is to be sent to the
client.
|
ServerRequest |
readRequest()
Reads the HTTP
Request information. |
void |
writeResponse(ServerResponse response)
Sends response data to the HTTP client.
|
ServerRequest readRequest() throws IOException
Request information.IllegalHttpStateException - if the request was already readIOExceptionvoid writeResponse(ServerResponse response) throws IOException
IllegalHttpStateException - if the request was not yet read
or the response was already sentHttpException - if the server returned an invalid HTTP
responseIOExceptionOutputStream getOutputStream()
IllegalHttpStateException - if the request was not yet read,
or the response was already sent, or data was sent by a
DataPoster, or this method was already calledvoid close()
throws IOException
IOExceptionCopyright © 2012. All Rights Reserved.