/** * Sends a complete text message, invoking the callback when complete * * @param message The text to send * @param wsChannel The web socket channel * @param callback The callback to invoke on completion * @param context The context object that will be passed to the callback on completion * @param timeoutmillis the timeout in milliseconds */ public static <T> void sendText(final ByteBuffer message, final WebSocketChannel wsChannel, final WebSocketCallback<T> callback, T context, long timeoutmillis) { sendInternal(message, WebSocketFrameType.TEXT, wsChannel, callback, context, timeoutmillis); }
/** * Sends a complete text message, invoking the callback when complete * Automatically frees the pooled byte buffer when done. * * @param pooledData The data to send, it will be freed when done * @param wsChannel The web socket channel * @param callback The callback to invoke on completion * @param context The context object that will be passed to the callback on completion */ public static <T> void sendText(final PooledByteBuffer pooledData, final WebSocketChannel wsChannel, final WebSocketCallback<T> callback, T context) { sendInternal(pooledData, WebSocketFrameType.TEXT, wsChannel, callback, context, -1); }
/** * Sends a complete ping message, invoking the callback when complete * * @param data The data to send * @param wsChannel The web socket channel * @param callback The callback to invoke on completion */ public static void sendPing(final ByteBuffer data, final WebSocketChannel wsChannel, final WebSocketCallback<Void> callback) { sendInternal(data, WebSocketFrameType.PING, wsChannel, callback, null, -1); }
/** * Sends a complete ping message, invoking the callback when complete * * @param data The data to send * @param wsChannel The web socket channel * @param callback The callback to invoke on completion * @param context The context object that will be passed to the callback on completion */ public static <T> void sendPing(final ByteBuffer data, final WebSocketChannel wsChannel, final WebSocketCallback<T> callback, T context) { sendInternal(data, WebSocketFrameType.PING, wsChannel, callback, context, -1); }
/** * Sends a complete ping message, invoking the callback when complete * * @param data The data to send * @param wsChannel The web socket channel * @param callback The callback to invoke on completion * @param timeoutmillis the timeout in milliseconds */ public static void sendPing(final ByteBuffer data, final WebSocketChannel wsChannel, final WebSocketCallback<Void> callback, long timeoutmillis) { sendInternal(data, WebSocketFrameType.PING, wsChannel, callback, null, timeoutmillis); }
/** * Sends a complete pong message, invoking the callback when complete * Automatically frees the pooled byte buffer when done. * * @param pooledData The data to send, it will be freed when done * @param wsChannel The web socket channel * @param callback The callback to invoke on completion * @param context The context object that will be passed to the callback on completion */ public static <T> void sendPong(final PooledByteBuffer pooledData, final WebSocketChannel wsChannel, final WebSocketCallback<T> callback, T context) { sendInternal(pooledData, WebSocketFrameType.PONG, wsChannel, callback, context, -1); }
/** * Sends a complete pong message, invoking the callback when complete * Automatically frees the pooled byte buffer when done. * * @param pooledData The data to send, it will be freed when done * @param wsChannel The web socket channel * @param callback The callback to invoke on completion * @param timeoutmillis the timeout in milliseconds */ public static void sendPong(final PooledByteBuffer pooledData, final WebSocketChannel wsChannel, final WebSocketCallback<Void> callback, long timeoutmillis) { sendInternal(pooledData, WebSocketFrameType.PONG, wsChannel, callback, null, timeoutmillis); }
/** * Sends a complete ping message, invoking the callback when complete * Automatically frees the pooled byte buffer when done. * * @param pooledData The data to send, it will be freed when done * @param wsChannel The web socket channel * @param callback The callback to invoke on completion * @param context The context object that will be passed to the callback on completion */ public static <T> void sendPing(final PooledByteBuffer pooledData, final WebSocketChannel wsChannel, final WebSocketCallback<T> callback, T context) { sendInternal(pooledData, WebSocketFrameType.PING, wsChannel, callback, context, -1); }
/** * Sends a complete ping message, invoking the callback when complete * Automatically frees the pooled byte buffer when done. * * @param pooledData The data to send, it will be freed when done * @param wsChannel The web socket channel * @param callback The callback to invoke on completion * @param timeoutmillis the timeout in milliseconds */ public static void sendPing(final PooledByteBuffer pooledData, final WebSocketChannel wsChannel, final WebSocketCallback<Void> callback, long timeoutmillis) { sendInternal(pooledData, WebSocketFrameType.PING, wsChannel, callback, null, timeoutmillis); }
/** * Sends a complete pong message, invoking the callback when complete * * @param data The data to send * @param wsChannel The web socket channel * @param callback The callback to invoke on completion * @param context The context object that will be passed to the callback on completion * @param timeoutmillis the timeout in milliseconds */ public static <T> void sendPong(final ByteBuffer data, final WebSocketChannel wsChannel, final WebSocketCallback<T> callback, T context, long timeoutmillis) { sendInternal(data, WebSocketFrameType.PONG, wsChannel, callback, context, timeoutmillis); }
/** * Sends a complete binary message, invoking the callback when complete * * @param data The data to send * @param wsChannel The web socket channel * @param callback The callback to invoke on completion * @param timeoutmillis the timeout in milliseconds */ public static void sendBinary(final ByteBuffer data, final WebSocketChannel wsChannel, final WebSocketCallback<Void> callback, long timeoutmillis) { sendInternal(data, WebSocketFrameType.BINARY, wsChannel, callback, null, timeoutmillis); }
/** * Sends a complete binary message, invoking the callback when complete * Automatically frees the pooled byte buffer when done. * * @param pooledData The data to send, it will be freed when done * @param wsChannel The web socket channel * @param callback The callback to invoke on completion * @param context The context object that will be passed to the callback on completion */ public static <T> void sendBinary(final PooledByteBuffer pooledData, final WebSocketChannel wsChannel, final WebSocketCallback<T> callback, T context) { sendInternal(pooledData, WebSocketFrameType.BINARY, wsChannel, callback, context, -1); }
/** * Sends a complete binary message, invoking the callback when complete * Automatically frees the pooled byte buffer when done. * * @param pooledData The data to send, it will be freed when done * @param wsChannel The web socket channel * @param callback The callback to invoke on completion * @param timeoutmillis the timeout in milliseconds */ public static void sendBinary(final PooledByteBuffer pooledData, final WebSocketChannel wsChannel, final WebSocketCallback<Void> callback, long timeoutmillis) { sendInternal(pooledData, WebSocketFrameType.BINARY, wsChannel, callback, null, timeoutmillis); }
/** * Sends a complete pong message, invoking the callback when complete * * @param data The data to send * @param wsChannel The web socket channel * @param callback The callback to invoke on completion */ public static void sendPong(final ByteBuffer data, final WebSocketChannel wsChannel, final WebSocketCallback<Void> callback) { sendInternal(data, WebSocketFrameType.PONG, wsChannel, callback, null, -1); }
/** * Sends a complete binary message, invoking the callback when complete * * @param data The data to send * @param wsChannel The web socket channel * @param callback The callback to invoke on completion * @param context The context object that will be passed to the callback on completion */ public static <T> void sendBinary(final ByteBuffer data, final WebSocketChannel wsChannel, final WebSocketCallback<T> callback, T context) { sendInternal(data, WebSocketFrameType.BINARY, wsChannel, callback, context, -1); }
/** * Sends a complete ping message, invoking the callback when complete * * @param data The data to send * @param wsChannel The web socket channel * @param callback The callback to invoke on completion */ public static void sendPing(final ByteBuffer[] data, final WebSocketChannel wsChannel, final WebSocketCallback<Void> callback) { sendInternal(mergeBuffers(data), WebSocketFrameType.PING, wsChannel, callback, null, -1); }
/** * Sends a complete binary message, invoking the callback when complete * * @param data The data to send * @param wsChannel The web socket channel * @param callback The callback to invoke on completion * @param timeoutmillis the timeout in milliseconds */ public static void sendBinary(final ByteBuffer[] data, final WebSocketChannel wsChannel, final WebSocketCallback<Void> callback, long timeoutmillis) { sendInternal(mergeBuffers(data), WebSocketFrameType.BINARY, wsChannel, callback, null, timeoutmillis); }
/** * Sends a complete ping message, invoking the callback when complete * * @param data The data to send * @param wsChannel The web socket channel * @param callback The callback to invoke on completion * @param context The context object that will be passed to the callback on completion */ public static <T> void sendPing(final ByteBuffer[] data, final WebSocketChannel wsChannel, final WebSocketCallback<T> callback, T context) { sendInternal(mergeBuffers(data), WebSocketFrameType.PING, wsChannel, callback, context, -1); }
/** * Sends a complete pong message, invoking the callback when complete * * @param data The data to send * @param wsChannel The web socket channel * @param callback The callback to invoke on completion * @param context The context object that will be passed to the callback on completion */ public static <T> void sendPong(final ByteBuffer[] data, final WebSocketChannel wsChannel, final WebSocketCallback<T> callback, T context) { sendInternal(mergeBuffers(data), WebSocketFrameType.PONG, wsChannel, callback, context, -1); }
/** * Sends a complete binary message, invoking the callback when complete * * @param data The data to send * @param wsChannel The web socket channel * @param callback The callback to invoke on completion * @param context The context object that will be passed to the callback on completion * @param timeoutmillis the timeout in milliseconds */ public static <T> void sendBinary(final ByteBuffer[] data, final WebSocketChannel wsChannel, final WebSocketCallback<T> callback, T context, long timeoutmillis) { sendInternal(mergeBuffers(data), WebSocketFrameType.BINARY, wsChannel, callback, context, timeoutmillis); }