Examples of WampPublishMessage


Examples of com.github.ghetolay.jwamp.message.WampPublishMessage

       
    if( !(msg instanceof WampPublishMessage) )
      fail("Wrong message type");
    assertEquals(WampMessage.PUBLISH, msg.getMessageType());
   
    WampPublishMessage pMsg = (WampPublishMessage)msg;
    assertEquals("http://example.com/simple", pMsg.getTopicId());
    assertEquals("Hello, world!", pMsg.getEvent());
  }
View Full Code Here

Examples of com.github.ghetolay.jwamp.message.WampPublishMessage

       
    if( !(msg instanceof WampPublishMessage) )
      fail("Wrong message type");
    assertEquals(WampMessage.PUBLISH, msg.getMessageType());
   
    WampPublishMessage pMsg = (WampPublishMessage)msg;
    assertEquals("http://example.com/simple", pMsg.getTopicId());
    assertNull(pMsg.getEvent());
  }
View Full Code Here

Examples of com.github.ghetolay.jwamp.message.WampPublishMessage

       
    if( !(msg instanceof WampPublishMessage) )
      fail("Wrong message type");
    assertEquals(WampMessage.PUBLISH, msg.getMessageType());
   
    WampPublishMessage pMsg = (WampPublishMessage)msg;
    assertEquals("http://example.com/event#myevent2", pMsg.getTopicId());
   
    Object event = pMsg.getEvent();
    if(event == null || !(event instanceof Map))
      fail("wrong event type");
   
    @SuppressWarnings("unchecked")
    Map<String,Object> evtObject = (Map<String,Object>)event;
View Full Code Here

Examples of com.github.ghetolay.jwamp.message.WampPublishMessage

       
    if( !(msg instanceof WampPublishMessage) )
      fail("Wrong message type");
    assertEquals(WampMessage.PUBLISH, msg.getMessageType());
   
    WampPublishMessage pMsg = (WampPublishMessage)msg;
    assertEquals("event:myevent1", pMsg.getTopicId());
    assertEquals("hello", pMsg.getEvent());
   
    List<String> excludeList = pMsg.getExclude();
    assertEquals(2, excludeList.size());
    assertEquals("NwtXQ8rdfPsy-ewS", excludeList.get(0));
    assertEquals("dYqgDl0FthI6_hjb", excludeList.get(1));
  }
View Full Code Here

Examples of com.github.ghetolay.jwamp.message.WampPublishMessage

       
    if( !(msg instanceof WampPublishMessage) )
      fail("Wrong message type");
    assertEquals(WampMessage.PUBLISH, msg.getMessageType());
   
    WampPublishMessage pMsg = (WampPublishMessage)msg;
    assertEquals("event:myevent1", pMsg.getTopicId());
    assertEquals("hello", pMsg.getEvent());
   
    assertTrue(pMsg.getExclude().isEmpty());
   
    assertEquals(1, pMsg.getEligible().size());
    assertEquals("NwtXQ8rdfPsy-ewS", pMsg.getEligible().get(0));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.