/** * Send a binary frame to the remote endpoint. * * @param data data to be sent. * @return {@link Future} which could be used to control/check the sending completion state. */ public Future<Frame> sendBinary(byte[] data) { checkConnectedState(); return protocolHandler.send(data); }
/** * Send a frame to the remote endpoint. * * @param data complete data frame. * @return {@link Future} which could be used to control/check the sending completion state. */ public Future<Frame> sendRawFrame(ByteBuffer data) { checkConnectedState(); return protocolHandler.sendRawFrame(data); }
/** * Send a text frame to the remote endpoint. * * @param data data to be sent. * @return {@link Future} which could be used to control/check the sending completion state. */ public Future<Frame> sendText(String data) { checkConnectedState(); return protocolHandler.send(data); }
/** * Send a text frame to the remote endpoint. * * @param data data to be sent. * @param handler {@link SendHandler#onResult(javax.websocket.SendResult)} will be called when sending is complete. */ public void sendText(String data, SendHandler handler) { checkConnectedState(); protocolHandler.send(data, handler); }
/** * Sends a fragment of a complete message. * * @param fragment the textual fragment to send. * @param last boolean indicating if this message fragment is the last. * @return {@link Future} which could be used to control/check the sending completion state. */ public Future<Frame> sendText(String fragment, boolean last) { checkConnectedState(); return protocolHandler.stream(last, fragment); }
/** * Send a binary frame to the remote endpoint. * * @param data data to be sent. * @param handler {@link SendHandler#onResult(javax.websocket.SendResult)} will be called when sending is complete. */ public void sendBinary(byte[] data, SendHandler handler) { checkConnectedState(); protocolHandler.send(data, handler); }
/** * Send a binary frame to the remote endpoint. * * @param data data to be sent. * @return {@link Future} which could be used to control/check the sending completion state. */ public Future<Frame> sendBinary(byte[] data) { checkConnectedState(); return protocolHandler.send(data); }
/** * Sends a fragment of a complete message. * * @param fragment the textual fragment to send. * @param last boolean indicating if this message fragment is the last. * @return {@link Future} which could be used to control/check the sending completion state. */ public Future<Frame> sendText(String fragment, boolean last) { checkConnectedState(); return protocolHandler.stream(last, fragment); }
/** * Send a text frame to the remote endpoint. * * @param data data to be sent. * @return {@link Future} which could be used to control/check the sending completion state. */ public Future<Frame> sendText(String data) { checkConnectedState(); return protocolHandler.send(data); }
/** * Send a text frame to the remote endpoint. * * @param data data to be sent. * @param handler {@link SendHandler#onResult(javax.websocket.SendResult)} will be called when sending is complete. */ public void sendText(String data, SendHandler handler) { checkConnectedState(); protocolHandler.send(data, handler); }
/** * Send a binary frame to the remote endpoint. * * @param data data to be sent. * @param handler {@link SendHandler#onResult(javax.websocket.SendResult)} will be called when sending is complete. */ public void sendBinary(byte[] data, SendHandler handler) { checkConnectedState(); protocolHandler.send(data, handler); }
/** * Send a frame to the remote endpoint. * * @param data complete data frame. * @return {@link Future} which could be used to control/check the sending completion state. */ public Future<Frame> sendRawFrame(ByteBuffer data) { checkConnectedState(); return protocolHandler.sendRawFrame(data); }
private Future<Frame> send(TyrusFrame frame) { checkConnectedState(); return protocolHandler.send(frame); }
/** * Sends a fragment of a complete message. * * @param bytes the binary fragment to send. * @param off the offset within the fragment to send. * @param len the number of bytes of the fragment to send. * @param last boolean indicating if this message fragment is the last. * @return {@link Future} which could be used to control/check the sending completion state. */ public Future<Frame> sendBinary(byte[] bytes, int off, int len, boolean last) { checkConnectedState(); return protocolHandler.stream(last, bytes, off, len); }
private Future<Frame> send(TyrusFrame frame) { checkConnectedState(); return protocolHandler.send(frame); }
/** * Sends a fragment of a complete message. * * @param bytes the binary fragment to send. * @param off the offset within the fragment to send. * @param len the number of bytes of the fragment to send. * @param last boolean indicating if this message fragment is the last. * @return {@link Future} which could be used to control/check the sending completion state. */ public Future<Frame> sendBinary(byte[] bytes, int off, int len, boolean last) { checkConnectedState(); return protocolHandler.stream(last, bytes, off, len); }