/** {@inheritDoc} */
  @Override
  public int send(List<Argument> arguments) {

    try {

      String[] parsedArgs = this.parseArguments(arguments);
      if (parsedArgs[XMPP_TO] == null || "".equals(parsedArgs[XMPP_TO])) {
        StringBuffer argumentString = new StringBuffer();
        boolean first = true;
        for (Argument argument : arguments) {
          if (!first) argumentString.append(", ");
          first = false;
          argumentString.append(argument == null ? "[null]" : "\"" + argument.toString() + "\"");
        }
        LOG.warn("Blank XMPP address on notification: {}", argumentString);
        return 1;
      }

      XMPPNotificationManager xmppManager = XMPPNotificationManager.getInstance();

      xmppManager.sendMessage(parsedArgs[XMPP_TO], parsedArgs[XMPP_MESSAGE]);

    } catch (Throwable e) {
      LOG.error(e.getMessage());
      return 1;
    }

    return 0;
  }