org.archive.crawler.fetcher
Class HeritrixSSLProtocolSocketFactory

java.lang.Object
  extended by org.archive.crawler.fetcher.HeritrixSSLProtocolSocketFactory
All Implemented Interfaces:
org.apache.commons.httpclient.protocol.ProtocolSocketFactory, org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory

public class HeritrixSSLProtocolSocketFactory
extends java.lang.Object
implements org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory

Implementation of the commons-httpclient SSLProtocolSocketFactory so we can return SSLSockets whose trust manager is ConfigurableX509TrustManager. We also go to the heritrix cache to get IPs to use making connection. To this, we have dependency on HeritrixProtocolSocketFactory; its assumed this class and it are used together. See HeritrixProtocolSocketFactory.getHostAddress(ServerCache,String).

Version:
$Id: HeritrixSSLProtocolSocketFactory.java 4553 2006-08-29 22:47:03Z stack-sf $
Author:
stack
See Also:
ConfigurableX509TrustManager

Constructor Summary
HeritrixSSLProtocolSocketFactory()
          Shutdown constructor.
 
Method Summary
 java.net.Socket createSocket(java.net.Socket socket, java.lang.String host, int port, boolean autoClose)
           
 java.net.Socket createSocket(java.lang.String host, int port)
           
 java.net.Socket createSocket(java.lang.String host, int port, java.net.InetAddress clientHost, int clientPort)
           
 java.net.Socket createSocket(java.lang.String host, int port, java.net.InetAddress localAddress, int localPort, org.apache.commons.httpclient.params.HttpConnectionParams params)
           
 boolean equals(java.lang.Object obj)
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeritrixSSLProtocolSocketFactory

public HeritrixSSLProtocolSocketFactory()
                                 throws java.security.KeyManagementException,
                                        java.security.KeyStoreException,
                                        java.security.NoSuchAlgorithmException
Shutdown constructor.

Throws:
java.security.KeyManagementException
java.security.KeyStoreException
java.security.NoSuchAlgorithmException
Method Detail

createSocket

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

createSocket

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

createSocket

public java.net.Socket createSocket(java.lang.String host,
                                    int port,
                                    java.net.InetAddress localAddress,
                                    int localPort,
                                    org.apache.commons.httpclient.params.HttpConnectionParams params)
                             throws java.io.IOException,
                                    java.net.UnknownHostException
Specified by:
createSocket in interface org.apache.commons.httpclient.protocol.ProtocolSocketFactory
Throws:
java.io.IOException
java.net.UnknownHostException

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
Specified by:
createSocket in interface org.apache.commons.httpclient.protocol.SecureProtocolSocketFactory
Throws:
java.io.IOException
java.net.UnknownHostException

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object


Copyright © 2003-2011 Internet Archive. All Rights Reserved.