Package de.bamberg.ha.api.messaging

Examples of de.bamberg.ha.api.messaging.PropertiesMessageImpl


 
  @Test
  public void testSimpleRouting() throws Exception {
     SimplePropertyMessageActionRouter router=new  SimplePropertyMessageActionRouter( registryMock );
     PropertiesMessageImpl msg=new PropertiesMessageImpl();
     msg.addHeaderAttribute(MessageHeader.ENDPOINT.name(), TESTSERVICE+":call");
     router.route(msg);
     assertTrue(registryCalled);
     assertTrue(serviceCalled);
  }
View Full Code Here


  }
 
  @Test (expected=MessageRoutingException.class)
  public void testNoServiceRegistry() throws Exception {
     SimplePropertyMessageActionRouter router=new  SimplePropertyMessageActionRouter( null );
     PropertiesMessageImpl msg=new PropertiesMessageImpl();
     msg.addHeaderAttribute(MessageHeader.ENDPOINT.name(), TESTSERVICE+":call");
     router.route(msg);
  }
View Full Code Here

  @Override
  public Message<Properties> parse(String incoming) {
    Message<Properties> result=null;
    if (incoming!=null) {
      result=new PropertiesMessageImpl();
      for (String element:incoming.split(splitRegEx) ) {
        String[] keyvalue=element.split("=");
        String key=keyvalue[0].trim();
        String value=keyvalue[1].trim();
        result.getContent().put(key,value);
View Full Code Here

TOP

Related Classes of de.bamberg.ha.api.messaging.PropertiesMessageImpl

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.