public class ObservableServlet extends Object
Observable interface to Servlet API| Constructor and Description |
|---|
ObservableServlet() |
| Modifier and Type | Method and Description |
|---|---|
static rx.Observable<Void> |
create(javax.servlet.ServletOutputStream out)
Observes
ServletOutputStream. |
static rx.Observable<Void> |
write(rx.Observable<byte[]> data,
javax.servlet.ServletOutputStream out)
Writes the given Observable data to ServletOutputStream.
|
public static rx.Observable<Void> create(javax.servlet.ServletOutputStream out)
ServletOutputStream.
This method uses Servlet 3.1 non-blocking API callback mechanisms. When the
container notifies that HTTP response can be written, the subscribed
Observer's onNext method is invoked.
Before calling this method, a web application must put the corresponding HTTP request into asynchronous mode.
out - servlet output streampublic static rx.Observable<Void> write(rx.Observable<byte[]> data, javax.servlet.ServletOutputStream out)
This method uses Servlet 3.1 non-blocking API callback mechanisms. When the HTTP
request data becomes available to be read, the subscribed Observer's
onNext method is invoked. Similarly, when all data for the
HTTP request has been read, the subscribed Observer's
onCompleted method is invoked.
Before calling this method, a web application must put the corresponding HTTP request into asynchronous mode.
data - out - servlet output streamCopyright © 2014–2018 Red Hat, Inc.. All rights reserved.