Package de.tuclausthal.informatik.winf.mobileagents.messaging

Examples of de.tuclausthal.informatik.winf.mobileagents.messaging.MessagingProvider


    int posColon = m.getRecipient().indexOf(":");
    if(posColon < 0) throw new RuntimeException("Invalid address!");
   
    // get corresponding provider
    String proto = m.getRecipient().substring(0, posColon);
    MessagingProvider p = (MessagingProvider)this.messagingProviders.get(proto);
    if(p==null) throw new RuntimeException("Unregistered protocol: "+proto);
   
    // strip off provider in message
    String recipient = m.getRecipient().substring(posColon+1);
    m.setRecipient(recipient);
   
    // finally send the message
    p.sendMessage(m);
  }
View Full Code Here

TOP

Related Classes of de.tuclausthal.informatik.winf.mobileagents.messaging.MessagingProvider

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.