Package org.springframework.flex.messaging

Examples of org.springframework.flex.messaging.SubscribeEvent


  }

  @Override
  public void onApplicationEvent(ApplicationEvent event) {
    if (event instanceof SubscribeEvent) {
      SubscribeEvent subscribe = (SubscribeEvent) event;
      String messageClientId = subscribe.getClientId();
      Map<String, String> body = new HashMap<String, String>();
      body.put("userId", subscribe.getSource().toString());
      body.put("chatMessage", "I am connected.");
      flexTemplate.send(new EventMessageCreator(event.getSource().toString(), messageClientId, "si-chat-receiver", body));
    } else if (event instanceof UnsubscribeEvent) {
      UnsubscribeEvent unsubscribe = (UnsubscribeEvent) event;
      String messageClientId = unsubscribe.getClientId();
View Full Code Here

TOP

Related Classes of org.springframework.flex.messaging.SubscribeEvent

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.