@Override public void setMaxIdleTimeout(long maxIdleTimeout) { checkConnectionState(State.CLOSED); this.maxIdleTimeout = maxIdleTimeout; restartIdleTimeoutExecutor(); if (distributedPropertyMap != null) { distributedPropertyMap.put(RemoteSession.DistributedMapKey.MAX_IDLE_TIMEOUT, maxIdleTimeout); } }
@Override public Future<Void> sendObject(Object data) { checkNotNull(data, "data"); session.restartIdleTimeoutExecutor(); return sendAsync(data, AsyncMessageType.OBJECT); }
@Override public void sendPing(ByteBuffer applicationData) throws IOException { if (applicationData != null && applicationData.remaining() > 125) { throw new IllegalArgumentException(LocalizationMessages.APPLICATION_DATA_TOO_LONG("Ping")); } session.restartIdleTimeoutExecutor(); webSocket.sendPing(Utils.getRemainingArray(applicationData)); }
@Override public Future<Void> sendBinary(ByteBuffer data) { checkNotNull(data, "data"); session.restartIdleTimeoutExecutor(); return sendAsync(data, AsyncMessageType.BINARY); }
@Override public Future<Void> sendBinary(ByteBuffer data) { checkNotNull(data, "data"); session.restartIdleTimeoutExecutor(); return sendAsync(data, AsyncMessageType.BINARY); }
@Override public void sendPing(ByteBuffer applicationData) throws IOException { if (applicationData != null && applicationData.remaining() > 125) { throw new IllegalArgumentException(LocalizationMessages.APPLICATION_DATA_TOO_LONG("Ping")); } session.restartIdleTimeoutExecutor(); webSocket.sendPing(Utils.getRemainingArray(applicationData)); }
@Override public Future<Void> sendText(String text) { checkNotNull(text, "text"); session.restartIdleTimeoutExecutor(); return sendAsync(text, AsyncMessageType.TEXT); }
@Override public void sendPong(ByteBuffer applicationData) throws IOException { if (applicationData != null && applicationData.remaining() > 125) { throw new IllegalArgumentException(LocalizationMessages.APPLICATION_DATA_TOO_LONG("Pong")); } session.restartIdleTimeoutExecutor(); webSocket.sendPong(Utils.getRemainingArray(applicationData)); }
@Override public Future<Void> sendObject(Object data) { checkNotNull(data, "data"); session.restartIdleTimeoutExecutor(); return sendAsync(data, AsyncMessageType.OBJECT); }
@Override public void sendPong(ByteBuffer applicationData) throws IOException { if (applicationData != null && applicationData.remaining() > 125) { throw new IllegalArgumentException(LocalizationMessages.APPLICATION_DATA_TOO_LONG("Pong")); } session.restartIdleTimeoutExecutor(); webSocket.sendPong(Utils.getRemainingArray(applicationData)); }
@Override public void sendText(String text, SendHandler handler) { checkNotNull(text, "text"); checkNotNull(handler, "handler"); session.restartIdleTimeoutExecutor(); sendAsync(text, handler, AsyncMessageType.TEXT); }
@Override public void sendBinary(ByteBuffer data, SendHandler handler) { checkNotNull(data, "data"); checkNotNull(handler, "handler"); session.restartIdleTimeoutExecutor(); sendAsync(data, handler, AsyncMessageType.BINARY); }
@Override public void sendObject(Object data, SendHandler handler) { checkNotNull(data, "data"); checkNotNull(handler, "handler"); session.restartIdleTimeoutExecutor(); sendAsync(data, handler, AsyncMessageType.OBJECT); }
@Override public void sendText(String text, SendHandler handler) { checkNotNull(text, "text"); checkNotNull(handler, "handler"); session.restartIdleTimeoutExecutor(); sendAsync(text, handler, AsyncMessageType.TEXT); }
@Override public void sendBinary(ByteBuffer data, SendHandler handler) { checkNotNull(data, "data"); checkNotNull(handler, "handler"); session.restartIdleTimeoutExecutor(); sendAsync(data, handler, AsyncMessageType.BINARY); }
@Override public void sendText(String partialMessage, boolean isLast) throws IOException { checkNotNull(partialMessage, "partialMessage"); session.getDebugContext().appendLogMessage(LOGGER, Level.FINEST, DebugContext.Type.MESSAGE_OUT, "Sending partial text message: ", partialMessage); final Future<?> future = webSocket.sendText(partialMessage, isLast); try { processFuture(future); } finally { session.restartIdleTimeoutExecutor(); } }
@Override public void sendText(String partialMessage, boolean isLast) throws IOException { checkNotNull(partialMessage, "partialMessage"); session.getDebugContext().appendLogMessage(LOGGER, Level.FINEST, DebugContext.Type.MESSAGE_OUT, "Sending partial text message: ", partialMessage); final Future<?> future = webSocket.sendText(partialMessage, isLast); try { processFuture(future); } finally { session.restartIdleTimeoutExecutor(); } }
@Override public void sendBinary(ByteBuffer data) throws IOException { checkNotNull(data, "data"); session.getDebugContext() .appendLogMessage(LOGGER, Level.FINEST, DebugContext.Type.MESSAGE_OUT, "Sending binary message"); final Future<?> future = webSocket.sendBinary(Utils.getRemainingArray(data)); try { processFuture(future); } finally { session.restartIdleTimeoutExecutor(); } }
@Override public void sendBinary(ByteBuffer partialByte, boolean isLast) throws IOException { checkNotNull(partialByte, "partialByte"); session.getDebugContext().appendLogMessage(LOGGER, Level.FINEST, DebugContext.Type.MESSAGE_OUT, "Sending partial binary message"); final Future<?> future = webSocket.sendBinary(Utils.getRemainingArray(partialByte), isLast); try { processFuture(future); } finally { session.restartIdleTimeoutExecutor(); } }
@Override public void sendBinary(ByteBuffer partialByte, boolean isLast) throws IOException { checkNotNull(partialByte, "partialByte"); session.getDebugContext().appendLogMessage(LOGGER, Level.FINEST, DebugContext.Type.MESSAGE_OUT, "Sending partial binary message"); final Future<?> future = webSocket.sendBinary(Utils.getRemainingArray(partialByte), isLast); try { processFuture(future); } finally { session.restartIdleTimeoutExecutor(); } }