
io.vertx.rxjava.core.http.WebSocket Maven / Gradle / Ivy
/*
* Copyright 2014 Red Hat, Inc.
*
* Red Hat licenses this file to you under the Apache License, version 2.0
* (the "License"); you may not use this file except in compliance with the
* License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.vertx.rxjava.core.http;
import rx.Observable;
import rx.Single;
import io.vertx.rx.java.RxHelper;
import io.vertx.rx.java.WriteStreamSubscriber;
import io.vertx.rx.java.SingleOnSubscribeAdapter;
import java.util.Map;
import java.util.Set;
import java.util.List;
import java.util.Iterator;
import java.util.function.Function;
import java.util.function.Supplier;
import java.util.stream.Collectors;
import io.vertx.core.Handler;
import io.vertx.core.AsyncResult;
import io.vertx.core.json.JsonObject;
import io.vertx.core.json.JsonArray;
import io.vertx.lang.rx.RxGen;
import io.vertx.lang.rx.TypeArg;
import io.vertx.lang.rx.MappingIterator;
/**
* Common WebSocket implementation.
*
* It implements both and so it can be used with
* {@link io.vertx.rxjava.core.streams.Pipe} to pipe data with flow control.
*
*
* NOTE: This class has been automatically generated from the {@link io.vertx.core.http.WebSocket original} non RX-ified interface using Vert.x codegen.
*/
@RxGen(io.vertx.core.http.WebSocket.class)
public class WebSocket implements io.vertx.rxjava.core.http.WebSocketBase {
@Override
public String toString() {
return delegate.toString();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
WebSocket that = (WebSocket) o;
return delegate.equals(that.delegate);
}
@Override
public int hashCode() {
return delegate.hashCode();
}
public static final TypeArg __TYPE_ARG = new TypeArg<>( obj -> new WebSocket((io.vertx.core.http.WebSocket) obj),
WebSocket::getDelegate
);
private final io.vertx.core.http.WebSocket delegate;
public WebSocket(io.vertx.core.http.WebSocket delegate) {
this.delegate = delegate;
}
public WebSocket(Object delegate) {
this.delegate = (io.vertx.core.http.WebSocket)delegate;
}
public io.vertx.core.http.WebSocket getDelegate() {
return delegate;
}
private Observable observable;
public synchronized Observable toObservable() {
if (observable == null) {
observable = RxHelper.toObservable(this.getDelegate());
}
return observable;
}
private WriteStreamSubscriber subscriber;
public synchronized WriteStreamSubscriber toSubscriber() {
if (subscriber == null) {
subscriber = RxHelper.toSubscriber(getDelegate());
}
return subscriber;
}
/**
* Pause this stream and return a to transfer the elements of this stream to a destination .
*
* The stream will be resumed when the pipe will be wired to a WriteStream
.
* @return a pipe
*/
public io.vertx.rxjava.core.streams.Pipe pipe() {
io.vertx.rxjava.core.streams.Pipe ret = io.vertx.rxjava.core.streams.Pipe.newInstance((io.vertx.core.streams.Pipe)delegate.pipe(), TypeArg.unknown());
return ret;
}
/**
* Pipe this ReadStream
to the WriteStream
.
*
* Elements emitted by this stream will be written to the write stream until this stream ends or fails.
* @param dst the destination write stream
* @return a future notified when the write stream will be ended with the outcome
*/
public io.vertx.core.Future pipeTo(io.vertx.rxjava.core.streams.WriteStream dst) {
io.vertx.core.Future ret = delegate.pipeTo(dst.getDelegate()).map(val -> val);
return ret;
}
/**
* Pipe this ReadStream
to the WriteStream
.
*
* Elements emitted by this stream will be written to the write stream until this stream ends or fails.
* @param dst the destination write stream
* @return a future notified when the write stream will be ended with the outcome
*/
public rx.Single rxPipeTo(io.vertx.rxjava.core.streams.WriteStream dst) {
return Single.create(new SingleOnSubscribeAdapter<>(fut -> {
this.pipeTo(dst).onComplete(fut);
}));
}
/**
* Write some data to the stream.
*
* The data is usually put on an internal write queue, and the write actually happens
* asynchronously. To avoid running out of memory by putting too much on the write queue,
* check the {@link io.vertx.rxjava.core.streams.WriteStream#writeQueueFull} method before writing. This is done automatically if
* using a .
*
*
When the data
is moved from the queue to the actual medium, the returned
* will be completed with the write result, e.g the future is succeeded
* when a server HTTP response buffer is written to the socket and failed if the remote
* client has closed the socket while the data was still pending for write.
* @param data the data to write
* @return a future completed with the write result
*/
public io.vertx.core.Future write(io.vertx.core.buffer.Buffer data) {
io.vertx.core.Future ret = delegate.write(data).map(val -> val);
return ret;
}
/**
* Write some data to the stream.
*
* The data is usually put on an internal write queue, and the write actually happens
* asynchronously. To avoid running out of memory by putting too much on the write queue,
* check the {@link io.vertx.rxjava.core.streams.WriteStream#writeQueueFull} method before writing. This is done automatically if
* using a .
*
*
When the data
is moved from the queue to the actual medium, the returned
* will be completed with the write result, e.g the future is succeeded
* when a server HTTP response buffer is written to the socket and failed if the remote
* client has closed the socket while the data was still pending for write.
* @param data the data to write
* @return a future completed with the write result
*/
public rx.Single rxWrite(io.vertx.core.buffer.Buffer data) {
return Single.create(new SingleOnSubscribeAdapter<>(fut -> {
this.write(data).onComplete(fut);
}));
}
/**
* Same as {@link io.vertx.rxjava.core.http.WebSocketBase#end} but writes some data to the stream before ending.
* @param data the data to write
* @return a future completed with the result
*/
public io.vertx.core.Future end(io.vertx.core.buffer.Buffer data) {
io.vertx.core.Future ret = delegate.end(data).map(val -> val);
return ret;
}
/**
* Same as {@link io.vertx.rxjava.core.http.WebSocketBase#end} but writes some data to the stream before ending.
* @param data the data to write
* @return a future completed with the result
*/
public rx.Single rxEnd(io.vertx.core.buffer.Buffer data) {
return Single.create(new SingleOnSubscribeAdapter<>(fut -> {
this.end(data).onComplete(fut);
}));
}
/**
* This will return true
if there are more bytes in the write queue than the value set using {@link io.vertx.rxjava.core.http.WebSocket#setWriteQueueMaxSize}
* @return true
if write queue is full
*/
public boolean writeQueueFull() {
boolean ret = delegate.writeQueueFull();
return ret;
}
/**
* When a WebSocket
is created, it may register an event handler with the event bus - the ID of that
* handler is given by this method.
*
* By default, no handler is registered, the feature must be enabled via {@link io.vertx.core.http.WebSocketConnectOptions} or {@link io.vertx.core.http.HttpServerOptions}.
*
* Given this ID, a different event loop can send a binary frame 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 connection. This
* allows you to write data to other WebSockets which are owned by different event loops.
* @return the binary handler id
*/
public java.lang.String binaryHandlerID() {
java.lang.String ret = delegate.binaryHandlerID();
return ret;
}
/**
* When a WebSocket
is created, it may register an event handler with the eventbus, the ID of that
* handler is given by textHandlerID
.
*
* By default, no handler is registered, the feature must be enabled via {@link io.vertx.core.http.WebSocketConnectOptions} or {@link io.vertx.core.http.HttpServerOptions}.
*
* Given this ID, a different event loop can send a text frame 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 connection. This
* allows you to write data to other WebSockets which are owned by different event loops.
* @return the text handler id
*/
public java.lang.String textHandlerID() {
java.lang.String ret = delegate.textHandlerID();
return ret;
}
/**
* Returns the WebSocket sub protocol selected by the WebSocket handshake.
*
* On the server, the value will be null
when the handler receives the WebSocket callback as the
* handshake will not be completed yet.
* @return
*/
public java.lang.String subProtocol() {
java.lang.String ret = delegate.subProtocol();
return ret;
}
/**
* Returns the close status code received from the remote endpoint or null
when not yet received.
* @return
*/
public java.lang.Short closeStatusCode() {
java.lang.Short ret = delegate.closeStatusCode();
return ret;
}
/**
* Returns the close reason message from the remote endpoint or null
when not yet received.
* @return
*/
public java.lang.String closeReason() {
java.lang.String ret = delegate.closeReason();
return ret;
}
/**
* Returns the HTTP headers.
* @return the headers
*/
public io.vertx.core.MultiMap headers() {
io.vertx.core.MultiMap ret = delegate.headers();
return ret;
}
/**
* Write a WebSocket frame to the connection
* @param frame the frame to write
* @return a future completed with the result
*/
public io.vertx.core.Future writeFrame(io.vertx.core.http.WebSocketFrame frame) {
io.vertx.core.Future ret = delegate.writeFrame(frame).map(val -> val);
return ret;
}
/**
* Write a WebSocket frame to the connection
* @param frame the frame to write
* @return a future completed with the result
*/
public rx.Single rxWriteFrame(io.vertx.core.http.WebSocketFrame frame) {
return Single.create(new SingleOnSubscribeAdapter<>(fut -> {
this.writeFrame(frame).onComplete(fut);
}));
}
/**
* Write a final WebSocket text frame to the connection
* @param text The text to write
* @return a future completed with the result
*/
public io.vertx.core.Future writeFinalTextFrame(java.lang.String text) {
io.vertx.core.Future ret = delegate.writeFinalTextFrame(text).map(val -> val);
return ret;
}
/**
* Write a final WebSocket text frame to the connection
* @param text The text to write
* @return a future completed with the result
*/
public rx.Single rxWriteFinalTextFrame(java.lang.String text) {
return Single.create(new SingleOnSubscribeAdapter<>(fut -> {
this.writeFinalTextFrame(text).onComplete(fut);
}));
}
/**
* Write a final WebSocket binary frame to the connection
* @param data The data to write
* @return a future completed with the result
*/
public io.vertx.core.Future writeFinalBinaryFrame(io.vertx.core.buffer.Buffer data) {
io.vertx.core.Future ret = delegate.writeFinalBinaryFrame(data).map(val -> val);
return ret;
}
/**
* Write a final WebSocket binary frame to the connection
* @param data The data to write
* @return a future completed with the result
*/
public rx.Single rxWriteFinalBinaryFrame(io.vertx.core.buffer.Buffer data) {
return Single.create(new SingleOnSubscribeAdapter<>(fut -> {
this.writeFinalBinaryFrame(data).onComplete(fut);
}));
}
/**
* Writes a (potentially large) piece of binary data to the connection. This data might be written as multiple frames
* if it exceeds the maximum WebSocket frame size.
* @param data the data to write
* @return a future completed with the result
*/
public io.vertx.core.Future writeBinaryMessage(io.vertx.core.buffer.Buffer data) {
io.vertx.core.Future ret = delegate.writeBinaryMessage(data).map(val -> val);
return ret;
}
/**
* Writes a (potentially large) piece of binary data to the connection. This data might be written as multiple frames
* if it exceeds the maximum WebSocket frame size.
* @param data the data to write
* @return a future completed with the result
*/
public rx.Single rxWriteBinaryMessage(io.vertx.core.buffer.Buffer data) {
return Single.create(new SingleOnSubscribeAdapter<>(fut -> {
this.writeBinaryMessage(data).onComplete(fut);
}));
}
/**
* Writes a (potentially large) piece of text data to the connection. This data might be written as multiple frames
* if it exceeds the maximum WebSocket frame size.
* @param text the data to write
* @return a future completed with the result
*/
public io.vertx.core.Future writeTextMessage(java.lang.String text) {
io.vertx.core.Future ret = delegate.writeTextMessage(text).map(val -> val);
return ret;
}
/**
* Writes a (potentially large) piece of text data to the connection. This data might be written as multiple frames
* if it exceeds the maximum WebSocket frame size.
* @param text the data to write
* @return a future completed with the result
*/
public rx.Single rxWriteTextMessage(java.lang.String text) {
return Single.create(new SingleOnSubscribeAdapter<>(fut -> {
this.writeTextMessage(text).onComplete(fut);
}));
}
/**
* Writes a ping frame to the connection. This will be written in a single frame. Ping frames may be at most 125 bytes (octets).
*
* This method should not be used to write application data and should only be used for implementing a keep alive or
* to ensure the client is still responsive, see RFC 6455 Section section 5.5.2.
*
* There is no handler for ping frames because RFC 6455 clearly
* states that the only response to a ping frame is a pong frame with identical contents.
* @param data the data to write, may be at most 125 bytes
* @return a future notified when the ping frame has been successfully written
*/
public io.vertx.core.Future writePing(io.vertx.core.buffer.Buffer data) {
io.vertx.core.Future ret = delegate.writePing(data).map(val -> val);
return ret;
}
/**
* Writes a ping frame to the connection. This will be written in a single frame. Ping frames may be at most 125 bytes (octets).
*
* This method should not be used to write application data and should only be used for implementing a keep alive or
* to ensure the client is still responsive, see RFC 6455 Section section 5.5.2.
*
* There is no handler for ping frames because RFC 6455 clearly
* states that the only response to a ping frame is a pong frame with identical contents.
* @param data the data to write, may be at most 125 bytes
* @return a future notified when the ping frame has been successfully written
*/
public rx.Single rxWritePing(io.vertx.core.buffer.Buffer data) {
return Single.create(new SingleOnSubscribeAdapter<>(fut -> {
this.writePing(data).onComplete(fut);
}));
}
/**
* Writes a pong frame to the connection. This will be written in a single frame. Pong frames may be at most 125 bytes (octets).
*
* This method should not be used to write application data and should only be used for implementing a keep alive or
* to ensure the client is still responsive, see RFC 6455 section 5.5.2.
*
* There is no need to manually write a pong frame, as the server and client both handle responding to a ping from with a pong from
* automatically and this is exposed to users. RFC 6455 section 5.5.3 states that pongs may be sent unsolicited in order
* to implement a one way heartbeat.
* @param data the data to write, may be at most 125 bytes
* @return a future notified when the pong frame has been successfully written
*/
public io.vertx.core.Future writePong(io.vertx.core.buffer.Buffer data) {
io.vertx.core.Future ret = delegate.writePong(data).map(val -> val);
return ret;
}
/**
* Writes a pong frame to the connection. This will be written in a single frame. Pong frames may be at most 125 bytes (octets).
*
* This method should not be used to write application data and should only be used for implementing a keep alive or
* to ensure the client is still responsive, see RFC 6455 section 5.5.2.
*
* There is no need to manually write a pong frame, as the server and client both handle responding to a ping from with a pong from
* automatically and this is exposed to users. RFC 6455 section 5.5.3 states that pongs may be sent unsolicited in order
* to implement a one way heartbeat.
* @param data the data to write, may be at most 125 bytes
* @return a future notified when the pong frame has been successfully written
*/
public rx.Single rxWritePong(io.vertx.core.buffer.Buffer data) {
return Single.create(new SingleOnSubscribeAdapter<>(fut -> {
this.writePong(data).onComplete(fut);
}));
}
/**
*
*
* Calls {@link io.vertx.rxjava.core.http.WebSocketBase#close}
* @return
*/
public io.vertx.core.Future end() {
io.vertx.core.Future ret = delegate.end().map(val -> val);
return ret;
}
/**
*
*
* Calls {@link io.vertx.rxjava.core.http.WebSocketBase#close}
* @return
*/
public rx.Single rxEnd() {
return Single.create(new SingleOnSubscribeAdapter<>(fut -> {
this.end().onComplete(fut);
}));
}
/**
* Close the WebSocket sending the default close frame.
*
* No more messages can be sent.
* @return a future completed with the result
*/
public io.vertx.core.Future close() {
io.vertx.core.Future ret = delegate.close().map(val -> val);
return ret;
}
/**
* Close the WebSocket sending the default close frame.
*
* No more messages can be sent.
* @return a future completed with the result
*/
public rx.Single rxClose() {
return Single.create(new SingleOnSubscribeAdapter<>(fut -> {
this.close().onComplete(fut);
}));
}
/**
* Close the WebSocket sending a close frame with specified status code. You can give a look at various close payloads
* here: RFC6455 section 7.4.1
*
* No more messages can be sent.
* @param statusCode the status code
* @return a future completed with the result
*/
public io.vertx.core.Future close(short statusCode) {
io.vertx.core.Future ret = delegate.close(statusCode).map(val -> val);
return ret;
}
/**
* Close the WebSocket sending a close frame with specified status code. You can give a look at various close payloads
* here: RFC6455 section 7.4.1
*
* No more messages can be sent.
* @param statusCode the status code
* @return a future completed with the result
*/
public rx.Single rxClose(short statusCode) {
return Single.create(new SingleOnSubscribeAdapter<>(fut -> {
this.close(statusCode).onComplete(fut);
}));
}
/**
* Close sending a close frame with specified status code and reason. You can give a look at various close payloads
* here: RFC6455 section 7.4.1
*
* No more messages can be sent.
* @param statusCode the status code
* @param reason reason of closure
* @return a future completed with the result
*/
public io.vertx.core.Future close(short statusCode, java.lang.String reason) {
io.vertx.core.Future ret = delegate.close(statusCode, reason).map(val -> val);
return ret;
}
/**
* Close sending a close frame with specified status code and reason. You can give a look at various close payloads
* here: RFC6455 section 7.4.1
*
* No more messages can be sent.
* @param statusCode the status code
* @param reason reason of closure
* @return a future completed with the result
*/
public rx.Single rxClose(short statusCode, java.lang.String reason) {
return Single.create(new SingleOnSubscribeAdapter<>(fut -> {
this.close(statusCode, reason).onComplete(fut);
}));
}
/**
* Like {@link io.vertx.rxjava.core.http.WebSocketBase#shutdown} with a 30 seconds timeout, the status code 1000
a null
reason.
* @return
*/
public io.vertx.core.Future shutdown() {
io.vertx.core.Future ret = delegate.shutdown().map(val -> val);
return ret;
}
/**
* Like {@link io.vertx.rxjava.core.http.WebSocketBase#shutdown} with a 30 seconds timeout, the status code 1000
a null
reason.
* @return
*/
public rx.Single rxShutdown() {
return Single.create(new SingleOnSubscribeAdapter<>(fut -> {
this.shutdown().onComplete(fut);
}));
}
/**
* Like {@link io.vertx.rxjava.core.http.WebSocketBase#shutdown} with a 30 seconds timeout and a null
reason.
* @param statusCode
* @return
*/
public io.vertx.core.Future shutdown(short statusCode) {
io.vertx.core.Future ret = delegate.shutdown(statusCode).map(val -> val);
return ret;
}
/**
* Like {@link io.vertx.rxjava.core.http.WebSocketBase#shutdown} with a 30 seconds timeout and a null
reason.
* @param statusCode
* @return
*/
public rx.Single rxShutdown(short statusCode) {
return Single.create(new SingleOnSubscribeAdapter<>(fut -> {
this.shutdown(statusCode).onComplete(fut);
}));
}
/**
* Like {@link io.vertx.rxjava.core.http.WebSocketBase#shutdown} with a 30 seconds timeout.
* @param statusCode
* @param reason
* @return
*/
public io.vertx.core.Future shutdown(short statusCode, java.lang.String reason) {
io.vertx.core.Future ret = delegate.shutdown(statusCode, reason).map(val -> val);
return ret;
}
/**
* Like {@link io.vertx.rxjava.core.http.WebSocketBase#shutdown} with a 30 seconds timeout.
* @param statusCode
* @param reason
* @return
*/
public rx.Single rxShutdown(short statusCode, java.lang.String reason) {
return Single.create(new SingleOnSubscribeAdapter<>(fut -> {
this.shutdown(statusCode, reason).onComplete(fut);
}));
}
/**
* Calls {@link io.vertx.rxjava.core.http.WebSocketBase#shutdown} with the status code 1000
and a null
reason.
* @param timeout
* @param unit
* @return
*/
public io.vertx.core.Future shutdown(long timeout, java.util.concurrent.TimeUnit unit) {
io.vertx.core.Future ret = delegate.shutdown(timeout, unit).map(val -> val);
return ret;
}
/**
* Calls {@link io.vertx.rxjava.core.http.WebSocketBase#shutdown} with the status code 1000
and a null
reason.
* @param timeout
* @param unit
* @return
*/
public rx.Single rxShutdown(long timeout, java.util.concurrent.TimeUnit unit) {
return Single.create(new SingleOnSubscribeAdapter<>(fut -> {
this.shutdown(timeout, unit).onComplete(fut);
}));
}
/**
* Calls {@link io.vertx.rxjava.core.http.WebSocketBase#shutdown} with a null
reason.
* @param timeout
* @param unit
* @param statusCode
* @return
*/
public io.vertx.core.Future shutdown(long timeout, java.util.concurrent.TimeUnit unit, short statusCode) {
io.vertx.core.Future ret = delegate.shutdown(timeout, unit, statusCode).map(val -> val);
return ret;
}
/**
* Calls {@link io.vertx.rxjava.core.http.WebSocketBase#shutdown} with a null
reason.
* @param timeout
* @param unit
* @param statusCode
* @return
*/
public rx.Single rxShutdown(long timeout, java.util.concurrent.TimeUnit unit, short statusCode) {
return Single.create(new SingleOnSubscribeAdapter<>(fut -> {
this.shutdown(timeout, unit, statusCode).onComplete(fut);
}));
}
/**
* Initiate a graceful WebSocket shutdown, the shutdown handler is notified and shall close the WebSocket, otherwise
* after a timeout
the WebSocket will be closed.
*
* The WebSocket is closed with specified status code and reason. You can give a look at various close payloads
* here: RFC6455 section 7.4.1
* @param timeout the amount of time after which all resources are forcibly closed
* @param unit the of the timeout
* @param statusCode the status code
* @param reason reason of closure
* @return a future completed when shutdown has completed
*/
public io.vertx.core.Future shutdown(long timeout, java.util.concurrent.TimeUnit unit, short statusCode, java.lang.String reason) {
io.vertx.core.Future ret = delegate.shutdown(timeout, unit, statusCode, reason).map(val -> val);
return ret;
}
/**
* Initiate a graceful WebSocket shutdown, the shutdown handler is notified and shall close the WebSocket, otherwise
* after a timeout
the WebSocket will be closed.
*
* The WebSocket is closed with specified status code and reason. You can give a look at various close payloads
* here: RFC6455 section 7.4.1
* @param timeout the amount of time after which all resources are forcibly closed
* @param unit the of the timeout
* @param statusCode the status code
* @param reason reason of closure
* @return a future completed when shutdown has completed
*/
public rx.Single rxShutdown(long timeout, java.util.concurrent.TimeUnit unit, short statusCode, java.lang.String reason) {
return Single.create(new SingleOnSubscribeAdapter<>(fut -> {
this.shutdown(timeout, unit, statusCode, reason).onComplete(fut);
}));
}
/**
* @return the remote address for this connection, possibly null
(e.g a server bound on a domain socket). If useProxyProtocol
is set to true
, the address returned will be of the actual connecting client.
*/
public io.vertx.core.net.SocketAddress remoteAddress() {
if (cached_0 != null) {
return cached_0;
}
io.vertx.core.net.SocketAddress ret = delegate.remoteAddress();
cached_0 = ret;
return ret;
}
/**
* @return the local address for this connection, possibly null
(e.g a server bound on a domain socket) If useProxyProtocol
is set to true
, the address returned will be of the proxy.
*/
public io.vertx.core.net.SocketAddress localAddress() {
if (cached_1 != null) {
return cached_1;
}
io.vertx.core.net.SocketAddress ret = delegate.localAddress();
cached_1 = ret;
return ret;
}
/**
* @return true if this {@link io.vertx.rxjava.core.http.HttpConnection} is encrypted via SSL/TLS.
*/
public boolean isSsl() {
boolean ret = delegate.isSsl();
return ret;
}
/**
* @return true
if the WebSocket cannot be used to send message anymore
*/
public boolean isClosed() {
boolean ret = delegate.isClosed();
return ret;
}
public io.vertx.rxjava.core.http.WebSocket exceptionHandler(io.vertx.core.Handler handler) {
delegate.exceptionHandler(handler);
return this;
}
public io.vertx.rxjava.core.http.WebSocket handler(io.vertx.core.Handler handler) {
delegate.handler(handler);
return this;
}
public io.vertx.rxjava.core.http.WebSocket pause() {
delegate.pause();
return this;
}
public io.vertx.rxjava.core.http.WebSocket resume() {
delegate.resume();
return this;
}
public io.vertx.rxjava.core.http.WebSocket fetch(long amount) {
delegate.fetch(amount);
return this;
}
public io.vertx.rxjava.core.http.WebSocket endHandler(io.vertx.core.Handler endHandler) {
delegate.endHandler(endHandler);
return this;
}
public io.vertx.rxjava.core.http.WebSocket setWriteQueueMaxSize(int maxSize) {
delegate.setWriteQueueMaxSize(maxSize);
return this;
}
public io.vertx.rxjava.core.http.WebSocket drainHandler(io.vertx.core.Handler handler) {
delegate.drainHandler(handler);
return this;
}
public io.vertx.rxjava.core.http.WebSocket closeHandler(io.vertx.core.Handler handler) {
delegate.closeHandler(handler);
return this;
}
public io.vertx.rxjava.core.http.WebSocket shutdownHandler(io.vertx.core.Handler handler) {
delegate.shutdownHandler(handler);
return this;
}
public io.vertx.rxjava.core.http.WebSocket frameHandler(io.vertx.core.Handler handler) {
delegate.frameHandler(handler);
return this;
}
public io.vertx.rxjava.core.http.WebSocket textMessageHandler(io.vertx.core.Handler handler) {
delegate.textMessageHandler(handler);
return this;
}
public io.vertx.rxjava.core.http.WebSocket binaryMessageHandler(io.vertx.core.Handler handler) {
delegate.binaryMessageHandler(handler);
return this;
}
public io.vertx.rxjava.core.http.WebSocket pongHandler(io.vertx.core.Handler handler) {
delegate.pongHandler(handler);
return this;
}
/**
* @return SSLSession associated with the underlying socket. Returns null if connection is not SSL.
*/
public javax.net.ssl.SSLSession sslSession() {
javax.net.ssl.SSLSession ret = delegate.sslSession();
return ret;
}
private io.vertx.core.net.SocketAddress cached_0;
private io.vertx.core.net.SocketAddress cached_1;
public static WebSocket newInstance(io.vertx.core.http.WebSocket arg) {
return arg != null ? new WebSocket(arg) : null;
}
}