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 readIOException
void 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
responseIOException
OutputStream 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 called
void close() throws IOException
IOException
Copyright © 2013. All Rights Reserved.