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, wait
newInstance
newInstance
public WebSocketStream(WebSocketStream delegate)
public Object getDelegate()
getDelegate
in interface ReadStream<WebSocket>
getDelegate
in interface StreamBase
public rx.Observable<WebSocket> toObservable()
toObservable
in interface ReadStream<WebSocket>
public WebSocketStream exceptionHandler(Handler<Throwable> handler)
ReadStream
exceptionHandler
in interface ReadStream<WebSocket>
exceptionHandler
in interface StreamBase
handler
- the exception handlerpublic WebSocketStream handler(Handler<WebSocket> handler)
ReadStream
handler
in interface ReadStream<WebSocket>
public WebSocketStream pause()
ReadStream
ReadSupport
. While it's paused, no data will be sent to the dataHandler
pause
in interface ReadStream<WebSocket>
public WebSocketStream resume()
ReadStream
ReadSupport
has been paused, reading will recommence on it.resume
in interface ReadStream<WebSocket>
public WebSocketStream endHandler(Handler<Void> endHandler)
ReadStream
endHandler
in interface ReadStream<WebSocket>
public static WebSocketStream newInstance(WebSocketStream arg)
Copyright © 2015. All Rights Reserved.