public class WebSocketStream extends Object implements ReadStream<WebSocket>
HttpClient WebSocket connection.
When the connection attempt is successful, the stream handler is called back with the WebSocket
argument, immediately followed by a call to the end handler. When the connection attempt fails, the exception handler is invoked.
The connection occurs when the handler(io.vertx.core.Handler<io.vertx.rxjava.core.http.WebSocket>) method is called with a non null handler, the other handlers should be
set before setting the handler.
original non RX-ified interface using Vert.x codegen.| Constructor and Description |
|---|
WebSocketStream(WebSocketStream delegate) |
| Modifier and Type | Method and Description |
|---|---|
WebSocketStream |
endHandler(Handler<Void> endHandler)
Set an end handler.
|
WebSocketStream |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the read stream.
|
Object |
getDelegate() |
WebSocketStream |
handler(Handler<WebSocket> handler)
Set a data handler.
|
static WebSocketStream |
newInstance(WebSocketStream arg) |
WebSocketStream |
pause()
Pause the
ReadSupport. |
WebSocketStream |
resume()
Resume reading.
|
rx.Observable<WebSocket> |
toObservable() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnewInstancenewInstancepublic WebSocketStream(WebSocketStream delegate)
public Object getDelegate()
getDelegate in interface ReadStream<WebSocket>getDelegate in interface StreamBasepublic rx.Observable<WebSocket> toObservable()
toObservable in interface ReadStream<WebSocket>public WebSocketStream exceptionHandler(Handler<Throwable> handler)
ReadStreamexceptionHandler in interface ReadStream<WebSocket>exceptionHandler in interface StreamBasehandler - the exception handlerpublic WebSocketStream handler(Handler<WebSocket> handler)
ReadStreamhandler in interface ReadStream<WebSocket>public WebSocketStream pause()
ReadStreamReadSupport. While it's paused, no data will be sent to the dataHandlerpause in interface ReadStream<WebSocket>public WebSocketStream resume()
ReadStreamReadSupport has been paused, reading will recommence on it.resume in interface ReadStream<WebSocket>public WebSocketStream endHandler(Handler<Void> endHandler)
ReadStreamendHandler in interface ReadStream<WebSocket>public static WebSocketStream newInstance(WebSocketStream arg)
Copyright © 2015. All rights reserved.