1 19 20 package com.lutris.airsent.business.sms; 21 import java.io.IOException ; 22 23 28 public class SMS{ 29 private String host = "localhost"; 30 private String port = "9001"; 31 private String id = "0"; 32 private String type = "0"; 33 private String password = "foo"; 34 35 36 43 public SMS(String host, String port, String id, 44 String type, String password) throws IOException { 45 this.host = host; 46 this.port = port; 47 this.id = id; 48 this.type = type; 49 this.password = password; 50 51 } 52 53 63 public void sendMessage(String id, String body) throws Exception { 64 try { 65 sendSMSMessage(id, body); 66 } catch (Exception e) { 67 throw new Exception ("Error opening socket" + e); 68 } 69 70 } 71 72 private void sendSMSMessage(String id, String body) throws Exception { 73 try { 74 82 } catch (Exception e) { 83 throw new Exception ("Error opening socket" + e); 84 } 85 86 } 87 88 } 89 90 91 92 93 | Popular Tags |