Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.http.impl.io
Class SSLSocketFactory  view SSLSocketFactory download SSLSocketFactory.java

java.lang.Object
  extended byorg.apache.http.impl.io.SSLSocketFactory
All Implemented Interfaces:
org.apache.http.io.SecureSocketFactory, org.apache.http.io.SocketFactory

public class SSLSocketFactory
extends java.lang.Object
implements org.apache.http.io.SecureSocketFactory

.A wrapper class for the standard JSSE SSLSocketFactory.


Field Summary
private static SSLSocketFactory DEFAULT_FACTORY
          The factory singleton.
 
Constructor Summary
SSLSocketFactory()
           
 
Method Summary
 java.net.Socket createSocket(java.net.Socket socket, java.lang.String host, int port, boolean autoClose)
          Returns a socket connected to the given host that is layered over an existing socket.
 java.net.Socket createSocket(java.lang.String host, int port, java.net.InetAddress localAddress, int localPort, org.apache.http.params.HttpParams params)
          Attempts to get a new socket connection to the given host within the given time limit.
static SSLSocketFactory getSocketFactory()
          Gets an singleton instance of the SSLProtocolSocketFactory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_FACTORY

private static final SSLSocketFactory DEFAULT_FACTORY
The factory singleton.

Constructor Detail

SSLSocketFactory

public SSLSocketFactory()
Method Detail

getSocketFactory

public static SSLSocketFactory getSocketFactory()
Gets an singleton instance of the SSLProtocolSocketFactory.


createSocket

public java.net.Socket createSocket(java.lang.String host,
                                    int port,
                                    java.net.InetAddress localAddress,
                                    int localPort,
                                    org.apache.http.params.HttpParams params)
                             throws java.io.IOException,
                                    java.net.UnknownHostException,
                                    org.apache.http.ConnectTimeoutException
Attempts to get a new socket connection to the given host within the given time limit.

Specified by:
createSocket in interface org.apache.http.io.SocketFactory
Since:
3.0

createSocket

public java.net.Socket createSocket(java.net.Socket socket,
                                    java.lang.String host,
                                    int port,
                                    boolean autoClose)
                             throws java.io.IOException,
                                    java.net.UnknownHostException
Description copied from interface: org.apache.http.io.SecureSocketFactory
Returns a socket connected to the given host that is layered over an existing socket. Used primarily for creating secure sockets through proxies.

Specified by:
createSocket in interface org.apache.http.io.SecureSocketFactory