@NotMutable @ThreadSafety(level=COMPLETELY_THREADSAFE) public final class JavaToLDAPSocketFactory extends javax.net.SocketFactory implements LDAPSocketFactory
LDAPSocketFactory
implementation that wraps a
standard Java socket factory to use when creating sockets. It will also
appear as a standard Java socket factory.
LDAPSocketFactory
interface.Constructor and Description |
---|
JavaToLDAPSocketFactory(javax.net.SocketFactory f)
Creates a new instance of this class that will use the provided socket
factory.
|
Modifier and Type | Method and Description |
---|---|
java.net.Socket |
createSocket(java.net.InetAddress address,
int port)
Creates a new socket to the specified server.
|
java.net.Socket |
createSocket(java.net.InetAddress address,
int port,
java.net.InetAddress localAddress,
int localPort)
Creates a new socket to the specified server.
|
java.net.Socket |
createSocket(java.lang.String host,
int port)
Creates a new socket to the specified server.
|
java.net.Socket |
createSocket(java.lang.String host,
int port,
java.net.InetAddress localAddress,
int localPort)
Creates a new socket to the specified server.
|
java.net.Socket |
makeSocket(java.lang.String host,
int port)
Creates a socket to use when connecting to the directory sever.
|
public JavaToLDAPSocketFactory(@NotNull javax.net.SocketFactory f)
f
- The socket factory to use to create the LDAP socket factory.@NotNull public java.net.Socket createSocket(@NotNull java.lang.String host, int port) throws java.io.IOException
createSocket
in class javax.net.SocketFactory
host
- The host to which the connection should be established.port
- The port to which the connection should be established.java.io.IOException
- If a problem occurs while creating the socket.@NotNull public java.net.Socket createSocket(@NotNull java.lang.String host, int port, @NotNull java.net.InetAddress localAddress, int localPort) throws java.io.IOException
createSocket
in class javax.net.SocketFactory
host
- The host to which the connection should be
established.port
- The port to which the connection should be
established.localAddress
- The local address to use for the connection. This
will be ignored.localPort
- The local port to use for the connection. This will
be ignored.java.io.IOException
- If a problem occurs while creating the socket.@NotNull public java.net.Socket createSocket(@NotNull java.net.InetAddress address, int port) throws java.io.IOException
createSocket
in class javax.net.SocketFactory
address
- The address to which the connection should be established.port
- The port to which the connection should be established.java.io.IOException
- If a problem occurs while creating the socket.@NotNull public java.net.Socket createSocket(@NotNull java.net.InetAddress address, int port, @NotNull java.net.InetAddress localAddress, int localPort) throws java.io.IOException
createSocket
in class javax.net.SocketFactory
address
- The address to which the connection should be
established.port
- The port to which the connection should be
established.localAddress
- The local address to use for the connection. This
will be ignored.localPort
- The local port to use for the connection. This will
be ignored.java.io.IOException
- If a problem occurs while creating the socket.@NotNull public java.net.Socket makeSocket(@NotNull java.lang.String host, int port) throws LDAPException
makeSocket
in interface LDAPSocketFactory
host
- The address of the server to which the socket should be
connected.port
- The port of the server to which the socket should be
connected.LDAPException
- If a problem occurs while establishing the
connection.