SMS Gateway(Java Programming)

Discussion in 'Software' started by lady89, Aug 14, 2008.

  1. lady89

    lady89

    Joined:
    Aug 14, 2008
    Messages:
    1
    I currently doing a java program on SMS Gateway where we can send and receive SMS using the GSM modem. We could send SMS from the website that is control by our admin. Once our admin send the broadcast question to registered users. We also set a specific format to our receive sms. Then the registered users can reply back answer to us. Then if the reply is in the correct or wrong format, we will send an auto reply. Now, my problem is the gateway sometimes jammed because it have to handle both receiving and sending sms at the same time.

    I planned to use queue method(Linked List) to queue up the sms.I plan to queue the sending sms first before the gateway process the receiving sms.

    I currently stuck with this.I tried using the following code:

    Queue<SMSMessage> smsQueue = new LinkedList<SMSMessage>();
    ......
    ......
    public void run() {
    while(true) {
    // peek at the head of the queue, but don't grab it
    Object pull = smsQueue.peek();
    SMSMessage enqueued = null;
    // grab the head of the queue
    if (pull!=null) {
    enqueued = smsQueue.poll();
    System.out.println("Enqueued successful");

    //send the message here
    String num = enqueued.getPhoneNo();
    String msg = enqueued.getMessage();


    Please help me...:-( thanks alot..
    lady89, Aug 14, 2008
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Twinkle
    Replies:
    0
    Views:
    4,078
    Twinkle
    May 6, 2006
  2. Pager O Rama
    Replies:
    0
    Views:
    688
    Pager O Rama
    Apr 23, 2006
  3. John
    Replies:
    0
    Views:
    1,165
  4. ykong

    MRTG with SMS Gateway

    ykong, Dec 27, 2007, in forum: Cisco
    Replies:
    0
    Views:
    597
    ykong
    Dec 27, 2007
  5. Evil Bastard

    web->sms or email->sms for vodafone?

    Evil Bastard, Jul 22, 2005, in forum: NZ Computing
    Replies:
    0
    Views:
    660
    Evil Bastard
    Jul 22, 2005
Loading...

Share This Page