org.openqa.selenium.remote
Class ReusingSocketSocketFactory
java.lang.Object
org.openqa.selenium.remote.ReusingSocketSocketFactory
- All Implemented Interfaces:
- org.apache.http.conn.scheme.SocketFactory
public class ReusingSocketSocketFactory
- extends java.lang.Object
- implements org.apache.http.conn.scheme.SocketFactory
Method Summary |
java.net.Socket |
connectSocket(java.net.Socket sock,
java.lang.String host,
int port,
java.net.InetAddress localAddress,
int localPort,
org.apache.http.params.HttpParams params)
|
java.net.Socket |
createSocket()
|
static ReusingSocketSocketFactory |
getSocketFactory()
Gets the default factory. |
boolean |
isSecure(java.net.Socket sock)
Checks whether a socket connection is secure. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReusingSocketSocketFactory
public ReusingSocketSocketFactory(org.apache.http.conn.scheme.HostNameResolver nameResolver)
ReusingSocketSocketFactory
public ReusingSocketSocketFactory()
getSocketFactory
public static ReusingSocketSocketFactory getSocketFactory()
- Gets the default factory. Usually there should be no reason for creating multiple instances of
this class.
- Returns:
- the default factory
createSocket
public java.net.Socket createSocket()
- Specified by:
createSocket
in interface org.apache.http.conn.scheme.SocketFactory
connectSocket
public java.net.Socket connectSocket(java.net.Socket sock,
java.lang.String host,
int port,
java.net.InetAddress localAddress,
int localPort,
org.apache.http.params.HttpParams params)
throws java.io.IOException
- Specified by:
connectSocket
in interface org.apache.http.conn.scheme.SocketFactory
- Throws:
java.io.IOException
isSecure
public final boolean isSecure(java.net.Socket sock)
throws java.lang.IllegalArgumentException
- Checks whether a socket connection is secure. This factory creates plain socket connections
which are not considered secure.
- Specified by:
isSecure
in interface org.apache.http.conn.scheme.SocketFactory
- Parameters:
sock
- the connected socket
- Returns:
false
- Throws:
java.lang.IllegalArgumentException
- if the argument is invalid
Copyright © 2011. All Rights Reserved.