Package org.smslib.http

Examples of org.smslib.http.BulkSmsHTTPGateway


    {
      OutboundMessage msg;
      System.out.println("Example: Send message from BulkSMS HTTP Interface.");
      System.out.println(Library.getLibraryDescription());
      System.out.println("Version: " + Library.getLibraryVersion());
      BulkSmsHTTPGateway gateway = new BulkSmsHTTPGateway("bulksms.http.1", "username", "password");
      gateway.setOutbound(true);
      Service.getInstance().addGateway(gateway);
      Service.getInstance().startService();
      // Query the service to find out our credit balance.
      System.out.println("Remaining credit: " + gateway.queryBalance());
      // Send a message synchronously.
      msg = new OutboundMessage("+30...", "Hello from SMSLib (BULKSMS handler)");
      Service.getInstance().sendMessage(msg);
      System.out.println(msg);
      System.out.println("Now Sleeping - Hit <enter> to terminate.");
View Full Code Here


      if (smsProvider == null || smsProvider.length() == 0 ||
          smsUsername == null || smsUsername.length() == 0) {
        log.error("SMS Provider is not configured properly!");
        return false;
      }
      gateway = new BulkSmsHTTPGateway(smsProvider, smsUsername, smsUserpass);
      gateway.setOutbound(true);
      Service.getInstance().addGateway(gateway);
      Service.getInstance().startService();
    }
    return gateway.queryBalance() >= 1;
View Full Code Here

      if (smsProvider == null || smsProvider.length() == 0 ||
          smsUsername == null || smsUsername.length() == 0) {
        log.error("SMS Provider is not configured properly!");
        return false;
      }
      gateway = new BulkSmsHTTPGateway(smsProvider, smsUsername, smsUserpass);
      gateway.setOutbound(true);
      Service.getInstance().addGateway(gateway);
      Service.getInstance().startService();
    }
    return gateway.queryBalance() >= 1;
View Full Code Here

TOP

Related Classes of org.smslib.http.BulkSmsHTTPGateway

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.