Package kfmes.natelib

Examples of kfmes.natelib.NateonMessenger


public class NateOnMessengerHelper {
  final static String nateOnSenderId = GlobalContext.getPropertyString("messengeractivity.nateon.id");
  final static String nateOnSenderPass = GlobalContext.getPropertyString("messengeractivity.nateon.password");
 
  public void sendMessage(java.lang.String nateOnReceiverId, java.lang.String content) {
    NateonMessenger nate = new NateonMessenger();
   
    if (!nate.isLoggedIn()) {
      nate.login(nateOnSenderId, nateOnSenderPass);
    }
   
    String requestAddMsg = "BPMS Administrator";
    nate.getNS().requestAdd(nateOnReceiverId, requestAddMsg.replaceAll(" ", " ").replaceAll("\n", "%0D%0A"));
   
    try {
      nate.sendIMessage(new InstanceMessage(nateOnSenderId, nateOnReceiverId, content));
      Thread.sleep(5000);
    } catch (IOException e) {
      e.printStackTrace();
    } catch (InterruptedException e) {
    }
   
    if (nate.isLoggedIn()) {
      try {
        nate.logout();
      } catch (IOException e) {
      }
    }
   
  }
View Full Code Here

TOP

Related Classes of kfmes.natelib.NateonMessenger

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.