@Override
  public void onSendMessage(final SendMessageEvent event) {
    if (event.resendOnFail()) {
      googleAnalytics.trackEvent("Chat", "Send Message");
    }
    final String message = event.getMessage();
    if (!message.isEmpty()) {
      final JsonpRequestBuilder jsonp = new JsonpRequestBuilder();
      jsonp.requestObject(
          JsessionUrlEncoder.encode(CAConstants.HOST + "/send", "msg", message),
          new SuccessCallback<SendMessageResponse>() {

            @Override
            public void onSuccess(final SendMessageResponse response) {
              if (response.getUser() != null) {
                User.update(getEventBus(), response.getUser());
              }
              if (response.getMessage() != null) {
                final MessageWrapper msg = new MessageWrapper(response.getMessage());
                if (gameStateProvider.getGameState().swapColors()) {
                  msg.swapColor();
                }
                if (event.resendOnFail()) {
                  addToMessagesCheckQueue(msg);
                }
              }
            }
          });
    }
  }
 @Override
 protected void onBind() {
   super.onBind();
   addRegisteredHandler(SendMessageEvent.getType(), this);
 }