org.lastbamboo.common.sip.httpclient
Class SipProtocolSocketFactory

java.lang.Object
  extended by org.lastbamboo.common.sip.httpclient.SipProtocolSocketFactory
All Implemented Interfaces:
org.apache.commons.httpclient.protocol.ProtocolSocketFactory

public final class SipProtocolSocketFactory
extends Object
implements org.apache.commons.httpclient.protocol.ProtocolSocketFactory

Socket factory for creating SIP-negotiated sockets for HTTP clients.


Constructor Summary
SipProtocolSocketFactory(org.lastbamboo.common.p2p.SocketFactory<Socket> sipSocketFactory)
          Creates a new factory for creating sockets from SIP URIs.
 
Method Summary
 Socket createSocket(String host, int port)
           
 Socket createSocket(String host, int port, InetAddress clientHost, int clientPort)
           
 Socket createSocket(String host, int port, InetAddress clientHost, int clientPort, org.apache.commons.httpclient.params.HttpConnectionParams params)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SipProtocolSocketFactory

public SipProtocolSocketFactory(org.lastbamboo.common.p2p.SocketFactory<Socket> sipSocketFactory)
Creates a new factory for creating sockets from SIP URIs.

Parameters:
sipSocketFactory - The factory that actually creates the sockets.
Method Detail

createSocket

public Socket createSocket(String host,
                           int port,
                           InetAddress clientHost,
                           int clientPort)
Specified by:
createSocket in interface org.apache.commons.httpclient.protocol.ProtocolSocketFactory

createSocket

public Socket createSocket(String host,
                           int port,
                           InetAddress clientHost,
                           int clientPort,
                           org.apache.commons.httpclient.params.HttpConnectionParams params)
                    throws IOException,
                           UnknownHostException,
                           org.apache.commons.httpclient.ConnectTimeoutException
Specified by:
createSocket in interface org.apache.commons.httpclient.protocol.ProtocolSocketFactory
Throws:
IOException
UnknownHostException
org.apache.commons.httpclient.ConnectTimeoutException

createSocket

public Socket createSocket(String host,
                           int port)
                    throws IOException,
                           UnknownHostException
Specified by:
createSocket in interface org.apache.commons.httpclient.protocol.ProtocolSocketFactory
Throws:
IOException
UnknownHostException


Copyright © 2013 LittleShoot. All Rights Reserved.