org.lastbamboo.common.sip.bootstrap
Class SipClientLauncher

java.lang.Object
  extended by org.lastbamboo.common.sip.bootstrap.SipClientLauncher
All Implemented Interfaces:
org.lastbamboo.common.offer.answer.Offerer, org.lastbamboo.common.p2p.P2PClient, org.lastbamboo.common.p2p.SocketFactory

public final class SipClientLauncher
extends Object
implements org.lastbamboo.common.p2p.P2PClient

This class kicks off all SIP client services.


Constructor Summary
SipClientLauncher(org.lastbamboo.common.sip.client.SipClientTracker sipClientTracker, RobustProxyRegistrarFactory registrarFactory, org.lastbamboo.common.offer.answer.OfferAnswerFactory offerAnswerFactory, int relayWaitTime)
          Launches a SIP client.
 
Method Summary
 void addConnectionListener(org.lastbamboo.common.p2p.P2PConnectionListener listener)
           
 String login(String user, String password)
           
 String login(String user, String password, String id)
           
 void logout()
           
 Socket newRawSocket(URI uri)
           
 Socket newRawUnreliableSocket(URI uri)
           
 Socket newSocket(URI sipUri)
           
 Socket newUnreliableSocket(URI sipUri)
           
 void offer(URI uri, byte[] offer, org.lastbamboo.common.offer.answer.OfferAnswerTransactionListener transactionListener, org.littleshoot.util.KeyStorage keyStore)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SipClientLauncher

public SipClientLauncher(org.lastbamboo.common.sip.client.SipClientTracker sipClientTracker,
                         RobustProxyRegistrarFactory registrarFactory,
                         org.lastbamboo.common.offer.answer.OfferAnswerFactory offerAnswerFactory,
                         int relayWaitTime)
Launches a SIP client.

Parameters:
sipClientTracker - Keeps track of SIP clients.
registrarFactory - The object for maintaining a registration with a SIP proxy.
offerAnswerFactory - Factory for creating offers and answers.
relayWaitTime - The time to wait before using a relay.
Method Detail

login

public String login(String user,
                    String password)
Specified by:
login in interface org.lastbamboo.common.p2p.P2PClient

login

public String login(String user,
                    String password,
                    String id)
             throws IOException
Specified by:
login in interface org.lastbamboo.common.p2p.P2PClient
Throws:
IOException

offer

public void offer(URI uri,
                  byte[] offer,
                  org.lastbamboo.common.offer.answer.OfferAnswerTransactionListener transactionListener,
                  org.littleshoot.util.KeyStorage keyStore)
           throws IOException
Specified by:
offer in interface org.lastbamboo.common.offer.answer.Offerer
Throws:
IOException

newSocket

public Socket newSocket(URI sipUri)
                 throws IOException,
                        org.lastbamboo.common.offer.answer.NoAnswerException
Specified by:
newSocket in interface org.lastbamboo.common.p2p.SocketFactory
Throws:
IOException
org.lastbamboo.common.offer.answer.NoAnswerException

newUnreliableSocket

public Socket newUnreliableSocket(URI sipUri)
                           throws IOException,
                                  org.lastbamboo.common.offer.answer.NoAnswerException
Specified by:
newUnreliableSocket in interface org.lastbamboo.common.p2p.SocketFactory
Throws:
IOException
org.lastbamboo.common.offer.answer.NoAnswerException

newRawSocket

public Socket newRawSocket(URI uri)
                    throws IOException,
                           org.lastbamboo.common.offer.answer.NoAnswerException
Specified by:
newRawSocket in interface org.lastbamboo.common.p2p.SocketFactory
Throws:
IOException
org.lastbamboo.common.offer.answer.NoAnswerException

newRawUnreliableSocket

public Socket newRawUnreliableSocket(URI uri)
                              throws IOException,
                                     org.lastbamboo.common.offer.answer.NoAnswerException
Specified by:
newRawUnreliableSocket in interface org.lastbamboo.common.p2p.SocketFactory
Throws:
IOException
org.lastbamboo.common.offer.answer.NoAnswerException

logout

public void logout()
Specified by:
logout in interface org.lastbamboo.common.p2p.P2PClient

addConnectionListener

public void addConnectionListener(org.lastbamboo.common.p2p.P2PConnectionListener listener)
Specified by:
addConnectionListener in interface org.lastbamboo.common.p2p.P2PClient


Copyright © 2013 LittleShoot. All Rights Reserved.