AFUNIXSocketFactory
| Modifier and Type | Class and Description |
|---|---|
| public static class | AFSocketFactory.
A socket factory that always connects to a fixed socket address, no matter what. |
| Modifier and Type | Field and Description |
|---|---|
| private final Class |
| Access | Constructor and Description |
|---|---|
| protected | AFSocketFactory(Class<? extends AFSocketAddress>
The AFSocketAddress subclass. socketAddressClass)Creates a new socket factory instance. |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract Socket | |
| private Socket | |
| public abstract Socket | |
| public final Socket | createSocket(String
the server host name with which to connect, or
host, int null for the loopback address.the server port port)Implements abstract javax. Creates a socket and connects it to the specified remote host at the specified remote port. |
| public final Socket | createSocket(String
the server host name with which to connect, or
host, int null for the loopback address.the server port port, InetAddress the local address the socket is bound to localHost, int the local port the socket is bound to localPort)Implements abstract javax. Creates a socket and connects it to the specified remote host on the specified remote port. |
| public final Socket | createSocket(InetAddress
the server host address, int the server port port)Implements abstract javax. Creates a socket and connects it to the specified port number at the specified address. |
| public final Socket | createSocket(InetAddress
the server network address address, int the server port port, InetAddress the client network address localAddress, int the client port localPort)Implements abstract javax. Creates a socket and connect it to the specified remote address on the specified remote port. |
| protected final boolean | Returns: true if supported.The address to check. address)Checks whether the given |
| socketAddressClass | back to summary |
|---|---|
| private final Class<? extends AFSocketAddress> socketAddressClass | |
| AFSocketFactory | back to summary |
|---|---|
| protected AFSocketFactory(Class<? extends AFSocketAddress> socketAddressClass) Creates a new socket factory instance.
| |
| connectTo | back to summary |
|---|---|
| protected abstract Socket connectTo(A addr) throws IOException Creates a new
| |
| connectTo | back to summary |
|---|---|
private Socket connectTo(SocketAddress addr) throws IOException
| |
| createSocket | back to summary |
|---|---|
| public abstract Socket createSocket() throws SocketException Overrides javax. Doc from javax. Creates an unconnected socket. | |
| createSocket | back to summary |
|---|---|
| public final Socket createSocket(String host, int port) throws IOException Implements abstract javax. Doc from javax. Creates a socket and connects it to the specified remote host at the specified remote port. This socket is configured using the socket options established for this factory.
| |
| createSocket | back to summary |
|---|---|
| public final Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException Implements abstract javax. Doc from javax. Creates a socket and connects it to the specified remote host on the specified remote port. The socket will also be bound to the local address and port supplied. This socket is configured using the socket options established for this factory.
| |
| createSocket | back to summary |
|---|---|
| public final Socket createSocket(InetAddress address, int port) throws IOException Implements abstract javax. Doc from javax. Creates a socket and connects it to the specified port number at the specified address. This socket is configured using the socket options established for this factory.
| |
| createSocket | back to summary |
|---|---|
| public final Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException Implements abstract javax. Doc from javax. Creates a socket and connect it to the specified remote address on the specified remote port. The socket will also be bound to the local address and port supplied. The socket is configured using the socket options established for this factory.
| |
| isInetAddressSupported | back to summary |
|---|---|
| protected final boolean isInetAddressSupported(InetAddress address) Checks whether the given
| |
| Modifier and Type | Field and Description |
|---|---|
| private final SocketAddress |
| Access | Constructor and Description |
|---|---|
| public | FixedAddressSocketFactory(SocketAddress
The address to use for all connections. address)Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public SocketAddress | addressFromHost(String
The hostname host, int The port, or 0. port)Implements org. Translates a "host" string (and port) to an |
| protected Socket | connectTo(AFSocketAddress
The address to connect to. addr)Implements abstract org. Creates a new |
| public Socket | createSocket()
Implements abstract org. Creates an unconnected socket. |
| public boolean | isHostnameSupported(String
The host to check. host)Overrides default org. Checks whether the given hostname is supported by this socket factory. |
| forceAddr | back to summary |
|---|---|
| private final SocketAddress forceAddr | |
| FixedAddressSocketFactory | back to summary |
|---|---|
| public FixedAddressSocketFactory(SocketAddress address) Creates a
| |
| addressFromHost | back to summary |
|---|---|
| public SocketAddress addressFromHost(String host, int port) throws SocketException Implements org. Doc from org. Translates a "host" string (and port) to an
| |
| connectTo | back to summary |
|---|---|
| protected Socket connectTo(AFSocketAddress addr) throws IOException Implements abstract org. Doc from org. Creates a new
| |
| createSocket | back to summary |
|---|---|
| public Socket createSocket() throws SocketException Implements abstract org. Doc from javax. Creates an unconnected socket. | |
| isHostnameSupported | back to summary |
|---|---|
| public boolean isHostnameSupported(String host) Overrides default org. Doc from org. Checks whether the given hostname is supported by this socket factory. If not, calls to
createSocket will cause a | |