Example #1
0
  // TODO new publish
  public void onPublish(String sessionId, WampPublishMessage wampPublishMessage)
      throws SerializationException {
    EventAction e = eventMapping.getAction(wampPublishMessage.getTopicId());
    if (e != null) {
      OutputWampEventMessage msg = new OutputWampEventMessage();
      msg.setTopicId(wampPublishMessage.getTopicId());
      msg.setEvent(wampPublishMessage.getEvent());

      // e.publishTo think about it
      List<String> publishList =
          e.publishTo(getPublishList(e, sessionId, wampPublishMessage), wampPublishMessage, msg);
      if (publishList != null) for (String s : publishList) sendEvent(s, msg);

    } else if (log.isDebugEnabled())
      log.debug(
          "unable to publish : action name doesn't not exist " + wampPublishMessage.getTopicId());
  }