SipKeepAlive.java :  » Media » flibble-voip » com » sipresponse » flibblecallmgr » internal » Java Open Source

Java Open Source » Media » flibble voip 
flibble voip » com » sipresponse » flibblecallmgr » internal » SipKeepAlive.java
package com.sipresponse.flibblecallmgr.internal;

import com.sipresponse.flibblecallmgr.CallManager;
import com.sipresponse.flibblecallmgr.internal.actions.OptionsAction;

public class SipKeepAlive extends Thread
{
    private boolean stop = false;
    private CallManager callMgr;
    private Line line;
    public SipKeepAlive(CallManager callMgr,
                        Line line)
    {
        this.callMgr = callMgr;
        this.line = line;
        start();
    }
    public void shutdown()
    {
        stop = true;
        interrupt();
    }
    public void run()
    {
        while (!stop)
        {
            try
            {
                Thread.sleep(20000);
            }
            catch (InterruptedException e)
            {
                stop = true;
                break;
            }
            OptionsAction optionsAction = new OptionsAction(callMgr, line);
            optionsAction.start();
        }
    }
}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.