public class SockJSSocket extends Object implements io.vertx.rxjava.core.streams.ReadStream<io.vertx.rxjava.core.buffer.Buffer>, io.vertx.rxjava.core.streams.WriteStream<io.vertx.rxjava.core.buffer.Buffer>
The API is very similar to WebSocket.
It implements both and
so it can be used with
Pump to pump data with flow control.
NOTE: This class has been automatically generated from the
original non RX-ified interface using Vert.x codegen.| Constructor and Description |
|---|
SockJSSocket(SockJSSocket delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close it
|
SockJSSocket |
drainHandler(Handler<Void> handler) |
void |
end()
|
void |
end(io.vertx.rxjava.core.buffer.Buffer t) |
SockJSSocket |
endHandler(Handler<Void> endHandler) |
SockJSSocket |
exceptionHandler(Handler<Throwable> handler) |
Object |
getDelegate() |
SockJSSocket |
handler(Handler<io.vertx.rxjava.core.buffer.Buffer> handler) |
MultiMap |
headers()
Return the headers corresponding to the last request for this socket or the websocket handshake
Any cookie headers will be removed for security reasons
|
io.vertx.rxjava.core.net.SocketAddress |
localAddress()
Return the local address for this socket
|
static SockJSSocket |
newInstance(SockJSSocket arg) |
SockJSSocket |
pause() |
io.vertx.rxjava.core.net.SocketAddress |
remoteAddress()
Return the remote address for this socket
|
SockJSSocket |
resume() |
SockJSSocket |
setWriteQueueMaxSize(int maxSize) |
rx.Observable<io.vertx.rxjava.core.buffer.Buffer> |
toObservable() |
String |
uri()
Return the URI corresponding to the last request for this socket or the websocket handshake
|
Session |
webSession() |
User |
webUser() |
SockJSSocket |
write(io.vertx.rxjava.core.buffer.Buffer data) |
String |
writeHandlerID()
When a
SockJSSocket is created it automatically registers an event handler with the event bus, the ID of that
handler is given by writeHandlerID. |
boolean |
writeQueueFull() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitnewInstancenewInstancenewInstancepublic SockJSSocket(SockJSSocket delegate)
public Object getDelegate()
getDelegate in interface io.vertx.rxjava.core.streams.ReadStream<io.vertx.rxjava.core.buffer.Buffer>getDelegate in interface io.vertx.rxjava.core.streams.StreamBasegetDelegate in interface io.vertx.rxjava.core.streams.WriteStream<io.vertx.rxjava.core.buffer.Buffer>public rx.Observable<io.vertx.rxjava.core.buffer.Buffer> toObservable()
toObservable in interface io.vertx.rxjava.core.streams.ReadStream<io.vertx.rxjava.core.buffer.Buffer>public void end(io.vertx.rxjava.core.buffer.Buffer t)
end in interface io.vertx.rxjava.core.streams.WriteStream<io.vertx.rxjava.core.buffer.Buffer>public boolean writeQueueFull()
writeQueueFull in interface io.vertx.rxjava.core.streams.WriteStream<io.vertx.rxjava.core.buffer.Buffer>public SockJSSocket exceptionHandler(Handler<Throwable> handler)
exceptionHandler in interface io.vertx.rxjava.core.streams.ReadStream<io.vertx.rxjava.core.buffer.Buffer>exceptionHandler in interface io.vertx.rxjava.core.streams.StreamBaseexceptionHandler in interface io.vertx.rxjava.core.streams.WriteStream<io.vertx.rxjava.core.buffer.Buffer>public SockJSSocket handler(Handler<io.vertx.rxjava.core.buffer.Buffer> handler)
handler in interface io.vertx.rxjava.core.streams.ReadStream<io.vertx.rxjava.core.buffer.Buffer>public SockJSSocket pause()
pause in interface io.vertx.rxjava.core.streams.ReadStream<io.vertx.rxjava.core.buffer.Buffer>public SockJSSocket resume()
resume in interface io.vertx.rxjava.core.streams.ReadStream<io.vertx.rxjava.core.buffer.Buffer>public SockJSSocket endHandler(Handler<Void> endHandler)
endHandler in interface io.vertx.rxjava.core.streams.ReadStream<io.vertx.rxjava.core.buffer.Buffer>public SockJSSocket write(io.vertx.rxjava.core.buffer.Buffer data)
write in interface io.vertx.rxjava.core.streams.WriteStream<io.vertx.rxjava.core.buffer.Buffer>public SockJSSocket setWriteQueueMaxSize(int maxSize)
setWriteQueueMaxSize in interface io.vertx.rxjava.core.streams.WriteStream<io.vertx.rxjava.core.buffer.Buffer>public SockJSSocket drainHandler(Handler<Void> handler)
drainHandler in interface io.vertx.rxjava.core.streams.WriteStream<io.vertx.rxjava.core.buffer.Buffer>public String writeHandlerID()
SockJSSocket is created it automatically registers an event handler with the event bus, the ID of that
handler is given by writeHandlerID.
Given this ID, a different event loop can send a buffer to that event handler using the event bus and that buffer will be received by this instance in its own event loop and written to the underlying socket. This allows you to write data to other sockets which are owned by different event loops.
public void end()
end in interface io.vertx.rxjava.core.streams.WriteStream<io.vertx.rxjava.core.buffer.Buffer>public void close()
public io.vertx.rxjava.core.net.SocketAddress remoteAddress()
public io.vertx.rxjava.core.net.SocketAddress localAddress()
public MultiMap headers()
public String uri()
public Session webSession()
public User webUser()
public static SockJSSocket newInstance(SockJSSocket arg)
Copyright © 2016. All rights reserved.