Class BlockingHttpHandlerSample
java.lang.Object
org.glassfish.grizzly.samples.httpserver.blockinghandler.BlockingHttpHandlerSample
This example demonstrates the use of a HttpHandler to echo
HTTP POST data sent by the client, back to the client.
The is composed of two main parts (as nested classes of BlockingHttpHandlerSample)
-
Client: This is a simple
HTTPbased on the GrizzlyHttpClientFilter. The client uses a customFilteron top of theHttpClientFilterto send thePOSTand read, and ultimately display, the response from the server. -
BlockingEchoHandler: This
HttpHandleris installed to theHttpServerinstance and associated with the path/echo. ThisHttpHandleris fairly simple. The handler uses theReaderreturned byRequest.getReader()in blocking mode. As data is received, the same data is then immediately written to the response.
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
BlockingHttpHandlerSample
public BlockingHttpHandlerSample()
-
-
Method Details
-
main
-