|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HttpServer
Specifies methods for an HTTP server, which is handling a single request from an HTTP client. Methods must be called in specific order for a successful HTTP exchange to take place. The order of calls that must be made is:
Method Summary | |
---|---|
void |
close()
Closes and releases any open connections or resources used by this server. |
java.io.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. |
Method Detail |
---|
ServerRequest readRequest() throws java.io.IOException
Request
information.
IllegalHttpStateException
- if the request was already read
java.io.IOException
void writeResponse(ServerResponse response) throws java.io.IOException
IllegalHttpStateException
- if the request was not yet read
or the response was already sent
HttpException
- if the server returned an invalid HTTP
response
java.io.IOException
java.io.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 java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |