public class AFUnixSocketFactory extends SocketFactory
AFUNIXSocket
to connect to a host, it is
intended for local file-based unix native socket connections only.Modifier and Type | Field and Description |
---|---|
static String |
SOCKET_FILE_PROPERTY
System parameter name specifying location of the socket file.
|
private String |
socketFile
File system location of the domain socket.
|
Constructor and Description |
---|
AFUnixSocketFactory()
Creates a new AFUnixSocketFactory configured with the system property
SOCKET_FILE_PROPERTY . |
AFUnixSocketFactory(String socket)
Creates a new AFUnixSocketFactory with a given file path.
|
Modifier and Type | Method and Description |
---|---|
Socket |
createSocket(InetAddress host,
int port)
Uses the
socketFile property as the path to initiate a file socket ignoring all parameters of this
method. |
Socket |
createSocket(InetAddress address,
int port,
InetAddress localAddress,
int localPort)
Uses the
socketFile property as the path to initiate a file socket ignoring all parameters of this
method. |
Socket |
createSocket(String host,
int port)
Uses the
socketFile property as the path to initiate a file socket ignoring all parameters of this
method. |
Socket |
createSocket(String host,
int port,
InetAddress localHost,
int localPort)
Uses the
socketFile property as the path to initiate a file socket ignoring all parameters of this
method. |
static SocketFactory |
getDefault()
This returns a new instance of AFUnixSocketFactory.
|
createSocket
public static final String SOCKET_FILE_PROPERTY
private final String socketFile
SOCKET_FILE_PROPERTY
public AFUnixSocketFactory()
SOCKET_FILE_PROPERTY
.public AFUnixSocketFactory(String socket)
socket
- file system location of the domain socketpublic static SocketFactory getDefault()
AFUnixSocketFactory()
.public Socket createSocket(String host, int port) throws IOException
socketFile
property as the path to initiate a file socket ignoring all parameters of this
method.createSocket
in class SocketFactory
host
- Unsupported, will be ignoredport
- Unsupported, will be ignoredIOException
- if the file system location cannot be URL decodedpublic Socket createSocket(String host, int port, InetAddress localHost, int localPort) throws IOException
socketFile
property as the path to initiate a file socket ignoring all parameters of this
method.createSocket
in class SocketFactory
host
- Unsupported, will be ignoredport
- Unsupported, will be ignoredlocalHost
- Unsupported, will be ignoredlocalPort
- Unsupported, will be ignoredIOException
- If socketFile is not specified or an underlying error occurs.public Socket createSocket(InetAddress host, int port) throws IOException
socketFile
property as the path to initiate a file socket ignoring all parameters of this
method.createSocket
in class SocketFactory
host
- Unsupported, will be ignoredport
- Unsupported, will be ignoredIOException
- If socketFile is not specified or an underlying error occurs.public Socket createSocket(InetAddress address, int port, InetAddress localAddress, int localPort) throws IOException
socketFile
property as the path to initiate a file socket ignoring all parameters of this
method.createSocket
in class SocketFactory
address
- Unsupported, will be ignoredport
- Unsupported, will be ignoredlocalAddress
- Unsupported, will be ignoredlocalPort
- Unsupported, will be ignoredIOException
- If socketFile is not specified or an underlying error occurs.Copyright © 2003-2019 Virginia Tech. All Rights Reserved.