List of usage examples for com.google.gwt.websocket.client SocketMessage isMessageIsSent
public final native boolean isMessageIsSent() ;
From source file:org.rest.client.activity.SocketActivity.java
License:Apache License
@Override public void prepareDownloadData(Callback<String, Throwable> callback) { if (exportFileObjectUrl != null) { revokeDownloadData();//from w w w . j a va 2 s. c om } StringBuilder out = new StringBuilder(); for (SocketMessage message : messages) { long time = (long) message.getCreated(); Date created = new Date(time); String date = DateTimeFormat.getFormat(PredefinedFormat.DATE_TIME_MEDIUM).format(created); boolean isSent = message.isMessageIsSent(); out.append("[").append(date).append("]"); out.append(isSent ? " <<< " : " >>> "); out.append(message.getStringMessage()); out.append("\n"); } exportFileObjectUrl = createDownloadDataImpl(out.toString(), "text/plain"); callback.onSuccess(exportFileObjectUrl); }