public Future<Void> sendObjectByFuture(Object obj) { FutureToSendHandler f2sh = new FutureToSendHandler(wsSession); sendObjectByCompletion(obj, f2sh); return f2sh; }
public Future<Void> sendObjectByFuture(Object obj) { FutureToSendHandler f2sh = new FutureToSendHandler(wsSession); sendObjectByCompletion(obj, f2sh); return f2sh; }
public Future<Void> sendBytesByFuture(ByteBuffer data) { FutureToSendHandler f2sh = new FutureToSendHandler(wsSession); sendBytesByCompletion(data, f2sh); return f2sh; }
public Future<Void> sendObjectByFuture(Object obj) { FutureToSendHandler f2sh = new FutureToSendHandler(wsSession); sendObjectByCompletion(obj, f2sh); return f2sh; }
public Future<Void> sendStringByFuture(String text) { FutureToSendHandler f2sh = new FutureToSendHandler(wsSession); sendStringByCompletion(text, f2sh); return f2sh; }
public Future<Void> sendBytesByFuture(ByteBuffer data) { FutureToSendHandler f2sh = new FutureToSendHandler(wsSession); sendBytesByCompletion(data, f2sh); return f2sh; }
public Future<Void> sendStringByFuture(String text) { FutureToSendHandler f2sh = new FutureToSendHandler(wsSession); sendStringByCompletion(text, f2sh); return f2sh; }
public Future<Void> sendStringByFuture(String text) { FutureToSendHandler f2sh = new FutureToSendHandler(wsSession); sendStringByCompletion(text, f2sh); return f2sh; }
public Future<Void> sendObjectByFuture(Object obj) { FutureToSendHandler f2sh = new FutureToSendHandler(wsSession); sendObjectByCompletion(obj, f2sh); return f2sh; }
public Future<Void> sendBytesByFuture(ByteBuffer data) { FutureToSendHandler f2sh = new FutureToSendHandler(wsSession); sendBytesByCompletion(data, f2sh); return f2sh; }
public Future<Void> sendStringByFuture(String text) { FutureToSendHandler f2sh = new FutureToSendHandler(wsSession); sendStringByCompletion(text, f2sh); return f2sh; }
public Future<Void> sendBytesByFuture(ByteBuffer data) { FutureToSendHandler f2sh = new FutureToSendHandler(wsSession); sendBytesByCompletion(data, f2sh); return f2sh; }
public Future<Void> sendBytesByFuture(ByteBuffer data) { FutureToSendHandler f2sh = new FutureToSendHandler(wsSession); sendBytesByCompletion(data, f2sh); return f2sh; }
public Future<Void> sendStringByFuture(String text) { FutureToSendHandler f2sh = new FutureToSendHandler(wsSession); sendStringByCompletion(text, f2sh); return f2sh; }
public Future<Void> sendObjectByFuture(Object obj) { FutureToSendHandler f2sh = new FutureToSendHandler(wsSession); sendObjectByCompletion(obj, f2sh); return f2sh; }
void sendPartialString(CharBuffer part, boolean last) throws IOException { try { // Get the timeout before we send the message. The message may // trigger a session close and depending on timing the client // session may close before we can read the timeout. long timeout = getBlockingSendTimeout(); FutureToSendHandler f2sh = new FutureToSendHandler(wsSession); TextMessageSendHandler tmsh = new TextMessageSendHandler(f2sh, part, last, encoder, encoderBuffer, this); tmsh.write(); if (timeout == -1) { f2sh.get(); } else { f2sh.get(timeout, TimeUnit.MILLISECONDS); } } catch (InterruptedException e) { throw new IOException(e); } catch (ExecutionException e) { throw new IOException(e); } catch (TimeoutException e) { throw new IOException(e); } }
void startMessageBlock(byte opCode, ByteBuffer payload, boolean last) throws IOException { // Get the timeout before we send the message. The message may // trigger a session close and depending on timing the client // session may close before we can read the timeout. long timeout = getBlockingSendTimeout(); FutureToSendHandler f2sh = new FutureToSendHandler(wsSession); startMessage(opCode, payload, last, f2sh); try { if (timeout == -1) { f2sh.get(); } else { f2sh.get(timeout, TimeUnit.MILLISECONDS); } } catch (InterruptedException | ExecutionException | TimeoutException e) { throw new IOException(e); } }
void startMessageBlock(byte opCode, ByteBuffer payload, boolean last) throws IOException { // Get the timeout before we send the message. The message may // trigger a session close and depending on timing the client // session may close before we can read the timeout. long timeout = getBlockingSendTimeout(); FutureToSendHandler f2sh = new FutureToSendHandler(wsSession, opCode == Constants.OPCODE_CLOSE); startMessage(opCode, payload, last, f2sh); try { if (timeout == -1) { f2sh.get(); } else { f2sh.get(timeout, TimeUnit.MILLISECONDS); } } catch (InterruptedException e) { handleSendFailure(e); } catch (ExecutionException e) { throw new IOException(e); } catch (TimeoutException e) { throw new IOException(e); } }
void sendPartialString(CharBuffer part, boolean last) throws IOException { try { // Get the timeout before we send the message. The message may // trigger a session close and depending on timing the client // session may close before we can read the timeout. long timeout = getBlockingSendTimeout(); FutureToSendHandler f2sh = new FutureToSendHandler(wsSession); TextMessageSendHandler tmsh = new TextMessageSendHandler(f2sh, part, last, encoder, encoderBuffer, this); tmsh.write(); if (timeout == -1) { f2sh.get(); } else { f2sh.get(timeout, TimeUnit.MILLISECONDS); } } catch (InterruptedException | ExecutionException | TimeoutException e) { throw new IOException(e); } }
void sendPartialString(CharBuffer part, boolean last) throws IOException { try { // Get the timeout before we send the message. The message may // trigger a session close and depending on timing the client // session may close before we can read the timeout. long timeout = getBlockingSendTimeout(); FutureToSendHandler f2sh = new FutureToSendHandler(wsSession); TextMessageSendHandler tmsh = new TextMessageSendHandler(f2sh, part, last, encoder, encoderBuffer, this); tmsh.write(); if (timeout == -1) { f2sh.get(); } else { f2sh.get(timeout, TimeUnit.MILLISECONDS); } } catch (InterruptedException e) { handleSendFailure(e); } catch (ExecutionException e) { throw new IOException(e); } catch (TimeoutException e) { throw new IOException(e); } }