public abstract class SockJSSocketBase extends Object implements SockJSSocket
| Modifier and Type | Field and Description |
|---|---|
protected Vertx |
vertx |
protected Session |
webSession |
protected User |
webUser |
| Modifier | Constructor and Description |
|---|---|
protected |
SockJSSocketBase(Vertx vertx,
Session webSession,
User webUser) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close it
|
void |
closeAfterSessionExpired() |
void |
end()
Call
SockJSSocket.end(). |
void |
end(Handler<AsyncResult<Void>> handler)
Same as
WriteStream.end() but with an handler called when the operation completes |
abstract SockJSSocket |
exceptionHandler(Handler<Throwable> handler)
Set an exception handler on the read stream.
|
Session |
webSession() |
User |
webUser() |
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. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, drainHandler, endHandler, handler, headers, localAddress, pause, remoteAddress, resume, setWriteQueueMaxSize, uri, write, write, write, writefetch, pipe, pipeTo, pipeToend, end, writeQueueFullprotected final Vertx vertx
protected Session webSession
protected User webUser
public abstract SockJSSocket exceptionHandler(Handler<Throwable> handler)
ReadStreamexceptionHandler in interface ReadStream<Buffer>exceptionHandler in interface StreamBaseexceptionHandler in interface WriteStream<Buffer>exceptionHandler in interface SockJSSockethandler - the exception handlerpublic String writeHandlerID()
SockJSSocketSockJSSocket 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.
writeHandlerID in interface SockJSSocketpublic void end()
SockJSSocketSockJSSocket.end().end in interface WriteStream<Buffer>end in interface SockJSSocketpublic void end(Handler<AsyncResult<Void>> handler)
WriteStreamWriteStream.end() but with an handler called when the operation completesend in interface WriteStream<Buffer>public void close()
SockJSSocketclose in interface SockJSSocketpublic void closeAfterSessionExpired()
public Session webSession()
webSession in interface SockJSSocketpublic User webUser()
webUser in interface SockJSSocketCopyright © 2020. All rights reserved.