@Signature public void flush() throws IOException { getWrappedObject().getRemote().flush(); }
@Override public void flush() throws IOException { final ByteBuffer byteBuffer; synchronized (this) { byteBuffer = ByteBuffer.wrap(toByteArray()); reset(); } // Asynchronous call getRemote().sendBytes(byteBuffer); getRemote().flush(); } };
@Override public void onMessageText(String message, Object session) { final RemoteEndpoint remote = getRemote(); LOG.logMessage("[From Backend <---]" + message); /* Proxy message to frontend */ try { remote.sendString(message); if (remote.getBatchMode() == BatchMode.ON) { remote.flush(); } } catch (IOException e) { LOG.connectionFailed(e); throw new RuntimeIOException(e); } }
@Override public void onMessageText(String message, Object session) { final RemoteEndpoint remote = getRemote(); LOG.logMessage("[From Backend <---]" + message); /* Proxy message to frontend */ try { remote.sendString(message); if (remote.getBatchMode() == BatchMode.ON) { remote.flush(); } } catch (IOException e) { LOG.connectionFailed(e); throw new RuntimeIOException(e); } }