Class SockJSSocket
- All Implemented Interfaces:
MutinyDelegate,ReadStream<Buffer>,StreamBase,WriteStream<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 Mutiny-ified interface using Vert.x codegen.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSockJSSocket(io.vertx.ext.web.handler.sockjs.SockJSSocket delegate) SockJSSocket(Object delegate) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidcloseHandler(Runnable closeHandler) drainHandler(Runnable handler) io.smallrye.mutiny.Uni<Void>end()Same asWriteStream.end()but with anhandlercalled when the operation completesio.smallrye.mutiny.Uni<Void>Same as but with anhandlercalled when the operation completesBlocking variant ofWriteStream.end().endAndAwait(Buffer data) Blocking variant ofWriteStream.end(T).voidVariant ofWriteStream.end()that ignores the result of the operation.voidendAndForget(Buffer data) Variant ofWriteStream.end(T)that ignores the result of the operation.endHandler(Runnable endHandler) booleanexceptionHandler(Consumer<Throwable> handler) fetch(long amount) io.vertx.ext.web.handler.sockjs.SockJSSocketinthashCode()headers()static SockJSSocketnewInstance(io.vertx.ext.web.handler.sockjs.SockJSSocket arg) pause()pipe()io.smallrye.mutiny.Uni<Void>pipeTo(WriteStream<Buffer> dst) Pipe thisReadStreamto theWriteStream.pipeToAndAwait(WriteStream<Buffer> dst) Blocking variant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream).voidpipeToAndForget(WriteStream<Buffer> dst) Variant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)that ignores the result of the operation.resume()setWriteQueueMaxSize(int maxSize) io.smallrye.mutiny.Multi<Buffer>toMulti()toString()uri()webUser()io.smallrye.mutiny.Uni<Void>Same as but with anhandlercalled when the operation completesio.smallrye.mutiny.Uni<Void>writeAndAwait(Buffer data) Blocking variant ofWriteStream.write(T).writeAndAwait(String data) voidwriteAndForget(Buffer data) Variant ofWriteStream.write(T)that ignores the result of the operation.voidwriteAndForget(String data) boolean
-
Field Details
-
__TYPE_ARG
-
-
Constructor Details
-
SockJSSocket
public SockJSSocket(io.vertx.ext.web.handler.sockjs.SockJSSocket delegate) -
SockJSSocket
-
-
Method Details
-
getDelegate
public io.vertx.ext.web.handler.sockjs.SockJSSocket getDelegate()- Specified by:
getDelegatein interfaceMutinyDelegate- Specified by:
getDelegatein interfaceReadStream<Buffer>- Specified by:
getDelegatein interfaceStreamBase- Specified by:
getDelegatein interfaceWriteStream<Buffer>- Returns:
- the delegate used by this Mutiny object of generated type
-
toString
-
equals
-
hashCode
public int hashCode() -
toSubscriber
-
end
Description copied from interface:WriteStreamSame asWriteStream.end()but with anhandlercalled when the operation completesUnlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Specified by:
endin interfaceWriteStream<Buffer>- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
endAndAwait
Description copied from interface:WriteStreamBlocking variant ofWriteStream.end().This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Specified by:
endAndAwaitin interfaceWriteStream<Buffer>- Returns:
- the Void instance produced by the operation.
-
endAndForget
public void endAndForget()Description copied from interface:WriteStreamVariant ofWriteStream.end()that ignores the result of the operation.This method subscribes on the result of
WriteStream.end(), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromWriteStream.end()but you don't need to compose it with other operations.- Specified by:
endAndForgetin interfaceWriteStream<Buffer>
-
end
Description copied from interface:WriteStreamSame as but with anhandlercalled when the operation completesUnlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Specified by:
endin interfaceWriteStream<Buffer>- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
endAndAwait
Description copied from interface:WriteStreamBlocking variant ofWriteStream.end(T).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Specified by:
endAndAwaitin interfaceWriteStream<Buffer>- Returns:
- the Void instance produced by the operation.
-
endAndForget
Description copied from interface:WriteStreamVariant ofWriteStream.end(T)that ignores the result of the operation.This method subscribes on the result of
WriteStream.end(T), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromWriteStream.end(T)but you don't need to compose it with other operations.- Specified by:
endAndForgetin interfaceWriteStream<Buffer>
-
writeQueueFull
public boolean writeQueueFull()- Specified by:
writeQueueFullin interfaceWriteStream<Buffer>- Returns:
trueif write queue is full
-
pipe
- Specified by:
pipein interfaceReadStream<Buffer>- Returns:
- a pipe
-
pipeTo
Description copied from interface:ReadStreamPipe thisReadStreamto theWriteStream.Elements emitted by this stream will be written to the write stream until this stream ends or fails.
Once this stream has ended or failed, the write stream will be ended and the
handlerwill be called with the result.Unlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Specified by:
pipeToin interfaceReadStream<Buffer>- Parameters:
dst- the destination write stream- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
pipeToAndAwait
Description copied from interface:ReadStreamBlocking variant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Specified by:
pipeToAndAwaitin interfaceReadStream<Buffer>- Parameters:
dst- the destination write stream- Returns:
- the Void instance produced by the operation.
-
pipeToAndForget
Description copied from interface:ReadStreamVariant ofReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)that ignores the result of the operation.This method subscribes on the result of
ReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromReadStream.pipeTo(io.vertx.mutiny.core.streams.WriteStream)but you don't need to compose it with other operations.- Specified by:
pipeToAndForgetin interfaceReadStream<Buffer>- Parameters:
dst- the destination write stream
-
exceptionHandler
- Specified by:
exceptionHandlerin interfaceReadStream<Buffer>- Specified by:
exceptionHandlerin interfaceStreamBase- Specified by:
exceptionHandlerin interfaceWriteStream<Buffer>- Parameters:
handler- the exception handler- Returns:
-
handler
- Specified by:
handlerin interfaceReadStream<Buffer>- Returns:
-
pause
- Specified by:
pausein interfaceReadStream<Buffer>- Returns:
- a reference to this, so the API can be used fluently
-
resume
- Specified by:
resumein interfaceReadStream<Buffer>- Returns:
- a reference to this, so the API can be used fluently
-
fetch
- Specified by:
fetchin interfaceReadStream<Buffer>- Returns:
- a reference to this, so the API can be used fluently
-
endHandler
- Specified by:
endHandlerin interfaceReadStream<Buffer>- Returns:
-
closeHandler
-
write
-
writeAndAwait
-
writeAndForget
-
write
Description copied from interface:WriteStreamSame as but with anhandlercalled when the operation completesUnlike the bare Vert.x variant, this method returns a
Uni. Don't forget to subscribe on it to trigger the operation.- Specified by:
writein interfaceWriteStream<Buffer>- Returns:
- the
unifiring the result of the operation when completed, or a failure if the operation failed.
-
writeAndAwait
Description copied from interface:WriteStreamBlocking variant ofWriteStream.write(T).This method waits for the completion of the underlying asynchronous operation. If the operation completes successfully, the result is returned, otherwise the failure is thrown (potentially wrapped in a RuntimeException).
- Specified by:
writeAndAwaitin interfaceWriteStream<Buffer>- Returns:
- the Void instance produced by the operation.
-
writeAndForget
Description copied from interface:WriteStreamVariant ofWriteStream.write(T)that ignores the result of the operation.This method subscribes on the result of
WriteStream.write(T), but discards the outcome (item or failure). This method is useful to trigger the asynchronous operation fromWriteStream.write(T)but you don't need to compose it with other operations.- Specified by:
writeAndForgetin interfaceWriteStream<Buffer>
-
setWriteQueueMaxSize
- Specified by:
setWriteQueueMaxSizein interfaceWriteStream<Buffer>- Parameters:
maxSize- the max size of the write stream- Returns:
- a reference to this, so the API can be used fluently
-
drainHandler
- Specified by:
drainHandlerin interfaceWriteStream<Buffer>- Parameters:
handler- the handler- Returns:
-
writeHandlerID
- Returns:
- the
writeHandlerIDornullifwriteHandlerregistration is disabled inSockJSHandlerOptions
-
close
public void close() -
close
- Parameters:
statusCode-reason-
-
remoteAddress
- Returns:
-
localAddress
- Returns:
-
headers
- Returns:
-
uri
- Returns:
-
routingContext
- Returns:
- the Vert.x-Web RoutingContext corresponding to this socket
-
webSession
- Returns:
- the Vert.x-Web session corresponding to this socket
-
webUser
- Returns:
- the Vert.x-Web user corresponding to this socket
-
toMulti
- Specified by:
toMultiin interfaceReadStream<Buffer>
-
toBlockingIterable
-
toBlockingStream
-
newInstance
-