List of usage examples for com.google.gwt.websocket.client SocketMessage create
public static final native SocketMessage create(String message) ;
From source file:org.rest.client.activity.SocketActivity.java
License:Apache License
@Override public void sendMessage(String message) { if (socket == null) { StatusNotification.notify("Socket not ready", StatusNotification.TYPE_ERROR, StatusNotification.TIME_SHORT); return;//from w w w . j a v a 2 s . com } SocketMessage msg = SocketMessage.create(message); messages.add(msg); try { socket.send(message); } catch (Exception e) { messages.remove(msg); Log.error("Unable sent socket message", e); StatusNotification.notify("Unable sent socket message.", StatusNotification.TYPE_ERROR, StatusNotification.TIME_SHORT); } }