public class SMProxySocketFactory
extends javax.net.SocketFactory
implements java.util.Comparator<javax.net.SocketFactory>
| Constructor and Description |
|---|
SMProxySocketFactory(SMProxyWrapper wrapper) |
| Modifier and Type | Method and Description |
|---|---|
int |
compare(javax.net.SocketFactory o1,
javax.net.SocketFactory o2)
The LDAP Service Provider calls Comparator.compare() method for equality comparison
of the socket factories whose connections are being checked for equality by the
pooling mechanism.
|
java.net.Socket |
createSocket()
Creates an unconnected proxy Socket.
|
java.net.Socket |
createSocket(java.net.InetAddress address,
int port)
Creates an SMProxySocketWrapper socket and connects it to the specified port number at
the specified address.
|
java.net.Socket |
createSocket(java.net.InetAddress address,
int port,
java.net.InetAddress localAddress,
int localPort)
Creates an SMProxySocketWrapper socket and connect it to the specified remote address on the
specified remote port.
|
java.net.Socket |
createSocket(java.lang.String host,
int port)
Creates an SMProxySocketWraper socket and connects it to the specified remote host at
the specified remote port.
|
java.net.Socket |
createSocket(java.lang.String host,
int port,
java.net.InetAddress localHost,
int localPort)
Creates an SMProxySocketWrapper socket and connects it to the specified remote host on the
specified remote port.
|
static javax.net.SocketFactory |
getDefault()
Get the default socket from a static instance.
|
static void |
setDefault(SMProxyWrapper wrapper)
Set the SMProxyWrapper which should be used
by the static call to
getDefault(). |
public SMProxySocketFactory(SMProxyWrapper wrapper)
public static javax.net.SocketFactory getDefault()
public java.net.Socket createSocket()
throws java.io.IOException
createSocket in class javax.net.SocketFactoryjava.io.IOExceptionpublic static void setDefault(SMProxyWrapper wrapper)
getDefault().wrapper - The SMProxyWrapperpublic java.net.Socket createSocket(java.lang.String host,
int port)
throws java.io.IOException,
java.net.UnknownHostException
Note, when connection with JNDI, this is the method JNDI uses to connect to the SMProxyServer
createSocket in class javax.net.SocketFactoryhost - the Hostname to connectport - the port to connectjava.io.IOExceptionjava.net.UnknownHostExceptionpublic java.net.Socket createSocket(java.net.InetAddress address,
int port)
throws java.io.IOException
createSocket in class javax.net.SocketFactoryjava.io.IOExceptionpublic java.net.Socket createSocket(java.lang.String host,
int port,
java.net.InetAddress localHost,
int localPort)
throws java.io.IOException,
java.net.UnknownHostException
createSocket in class javax.net.SocketFactoryjava.io.IOExceptionjava.net.UnknownHostExceptionpublic java.net.Socket createSocket(java.net.InetAddress address,
int port,
java.net.InetAddress localAddress,
int localPort)
throws java.io.IOException
createSocket in class javax.net.SocketFactoryjava.io.IOExceptionpublic int compare(javax.net.SocketFactory o1,
javax.net.SocketFactory o2)
compare in interface java.util.Comparator<javax.net.SocketFactory>o1 - the first object to be compared.o2 - the second object to be compared.