Package com.epam.common.transport.server
Class ConnectAddressSocketFactory
java.lang.Object
javax.net.SocketFactory
com.epam.common.transport.server.ConnectAddressSocketFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
available
(int port) createSocket
(String host, int port) createSocket
(String host, int port, InetAddress localAddress, int localPort) createSocket
(InetAddress inetAddress, int port) createSocket
(InetAddress inetAddress, int port, InetAddress localAddress, int localPort) int
Methods inherited from class javax.net.SocketFactory
createSocket, getDefault
-
Constructor Details
-
ConnectAddressSocketFactory
-
-
Method Details
-
createSocket
- Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
-
createSocket
public Socket createSocket(String host, int port, InetAddress localAddress, int localPort) throws IOException - Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
-
createSocket
- Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
-
createSocket
public Socket createSocket(InetAddress inetAddress, int port, InetAddress localAddress, int localPort) throws IOException - Specified by:
createSocket
in classSocketFactory
- Throws:
IOException
-
available
public boolean available(int port) -
getNextAvailablePort
public int getNextAvailablePort()
-