org.semanticdesktop.aperture.crawler.imap
Class ImapCrawler.SimpleSocketFactory

java.lang.Object
  extended by javax.net.SocketFactory
      extended by javax.net.ssl.SSLSocketFactory
          extended by org.semanticdesktop.aperture.crawler.imap.ImapCrawler.SimpleSocketFactory
Enclosing class:
ImapCrawler

public static class ImapCrawler.SimpleSocketFactory
extends SSLSocketFactory

This is a socket factory that ignores ssl certificates.


Constructor Summary
ImapCrawler.SimpleSocketFactory()
          Creates a socket factory that will ignore the ssl certificate, and accept any as valid.
ImapCrawler.SimpleSocketFactory(File certificateFile, String password)
          Read trusted certificates from the given keyStore
 
Method Summary
 Socket createSocket()
          Creates a socket
 Socket createSocket(InetAddress host, int port)
          Creates a socket with the given parameters.
 Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort)
          Creates a socket with the given parameters.
 Socket createSocket(Socket socket, String host, int port, boolean flag)
          Creates a socket with the given parameters.
 Socket createSocket(String host, int port)
          Creates a socket with the given parameters.
 Socket createSocket(String host, int port, InetAddress localHost, int localPort)
          Creates a socket with the given parameters.
static SocketFactory getDefault()
          Returns the default socket factory
 String[] getDefaultCipherSuites()
          Returns an array of default cipher suites.
 String[] getSupportedCipherSuites()
          Returns an array of supported cipher suites.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImapCrawler.SimpleSocketFactory

public ImapCrawler.SimpleSocketFactory()
Creates a socket factory that will ignore the ssl certificate, and accept any as valid.


ImapCrawler.SimpleSocketFactory

public ImapCrawler.SimpleSocketFactory(File certificateFile,
                                       String password)
Read trusted certificates from the given keyStore

Parameters:
certificateFile -
password -
Method Detail

getDefault

public static SocketFactory getDefault()
Returns the default socket factory

Returns:
the default socket factory

createSocket

public Socket createSocket()
                    throws IOException
Creates a socket

Overrides:
createSocket in class SocketFactory
Returns:
a newly created socket
Throws:
IOException - if na I/O error occurs

createSocket

public Socket createSocket(Socket socket,
                           String host,
                           int port,
                           boolean flag)
                    throws IOException
Creates a socket with the given parameters.

Specified by:
createSocket in class SSLSocketFactory
Parameters:
socket - the parent socket
host - the host address
port - the port number
flag - the flag
Returns:
a newly created socket
Throws:
IOException - if something goes wrong in the process

createSocket

public Socket createSocket(InetAddress address,
                           int port,
                           InetAddress localAddress,
                           int localPort)
                    throws IOException
Creates a socket with the given parameters.

Specified by:
createSocket in class SocketFactory
Parameters:
address - the internet address
localAddress - the local address
port - the remote port number
localPort - the local port number
Returns:
a newly created socket
Throws:
IOException - if something goes wrong in the process

createSocket

public Socket createSocket(InetAddress host,
                           int port)
                    throws IOException
Creates a socket with the given parameters.

Specified by:
createSocket in class SocketFactory
Parameters:
host - the internet address
port - the remote port number
Returns:
a newly created socket
Throws:
IOException - if something goes wrong in the process

createSocket

public Socket createSocket(String host,
                           int port,
                           InetAddress localHost,
                           int localPort)
                    throws IOException
Creates a socket with the given parameters.

Specified by:
createSocket in class SocketFactory
Parameters:
host - the internet address
port - the remote port number
localHost - the local address
localPort - the local port number
Returns:
a newly created socket
Throws:
IOException - if something goes wrong in the process

createSocket

public Socket createSocket(String host,
                           int port)
                    throws IOException
Creates a socket with the given parameters.

Specified by:
createSocket in class SocketFactory
Parameters:
host - the internet address
port - the remote port number
Returns:
a newly created socket
Throws:
IOException - if something goes wrong in the process

getDefaultCipherSuites

public String[] getDefaultCipherSuites()
Returns an array of default cipher suites.

Specified by:
getDefaultCipherSuites in class SSLSocketFactory
Returns:
an array of default cipher suites.

getSupportedCipherSuites

public String[] getSupportedCipherSuites()
Returns an array of supported cipher suites.

Specified by:
getSupportedCipherSuites in class SSLSocketFactory
Returns:
an array of supported cipher suites.


Copyright © 2010 Aperture Development Team. All Rights Reserved.