Package ch.rasc.wampspring.message

Examples of ch.rasc.wampspring.message.EventMessage


          eligibleSessions.add(sessionId);
        }
      }

      if (!eligibleSessions.isEmpty()) {
        EventMessage eventMessage = new EventMessage(publishMessage.getTopicURI(), publishMessage.getEvent());
        wampMessageSender.sendMessageToClient(eligibleSessions, eventMessage);
      }
    }
  }
View Full Code Here


          Set<String> mySessionId = Collections.singleton(message
              .<String> getHeader(WampMessageHeader.WEBSOCKET_SESSION_ID));
          for (String replyToTopicURI : handlerMethod.getReplyTo()) {
            if (StringUtils.hasText(replyToTopicURI)) {
              if (handlerMethod.isExcludeSender() != null && handlerMethod.isExcludeSender()) {
                pubSubHandler.sendToAllExcept(new EventMessage(replyToTopicURI, returnValue),
                    mySessionId);
              } else {
                pubSubHandler.sendToAll(new EventMessage(replyToTopicURI, returnValue));
              }
            }
          }
        }
      } catch (Throwable ex) {
View Full Code Here

   *
   * @param topicURI the name of the topic
   * @param event the message
   */
  public void sendToAll(String topicURI, Object event) {
    pubSubHandler.sendToAll(new EventMessage(topicURI, event));
  }
View Full Code Here

   * @param topicURI the name of the topic
   * @param event the message
   * @param excludeSessionIds a set of session ids that will be excluded
   */
  public void sendToAllExcept(String topicURI, Object event, String excludeSessionId) {
    pubSubHandler.sendToAllExcept(new EventMessage(topicURI, event), Collections.singleton(excludeSessionId));
  }
View Full Code Here

   * @param topicURI the name of the topic
   * @param event the message
   * @param excludeSessionIds a set of session ids that will be excluded
   */
  public void sendToAllExcept(String topicURI, Object event, Set<String> excludeSessionIds) {
    pubSubHandler.sendToAllExcept(new EventMessage(topicURI, event), excludeSessionIds);
  }
View Full Code Here

   * @param event the message
   * @param eligibleSessionIds only the session ids listed here will receive
   *            the message
   */
  public void sendTo(String topicURI, Object event, Set<String> eligibleSessionIds) {
    pubSubHandler.sendTo(new EventMessage(topicURI, event), eligibleSessionIds);
  }
View Full Code Here

TOP

Related Classes of ch.rasc.wampspring.message.EventMessage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.