Interface TcpServerConnectionFactory
- All Known Implementing Classes:
AbstractServerConnectionFactory,TcpNetServerConnectionFactory,TcpNioServerConnectionFactory
public interface TcpServerConnectionFactory
Connection factories that act as TCP servers, listening for incoming connections.
- Since:
- 4.2
- Author:
- Gary Russell
-
Method Summary
Modifier and Type Method Description intgetPort()Return the port this server is listening on.SocketAddressgetServerSocketAddress()Return theSocketAddressthat the underlyingServerSocketis bound to.
-
Method Details
-
getPort
int getPort()Return the port this server is listening on. If the factory is configured to listen on a random port (0), this will return the actual port after the factory is started. It may return the previous value if the factory is stopped.- Returns:
- the port.
-
getServerSocketAddress
SocketAddress getServerSocketAddress()Return theSocketAddressthat the underlyingServerSocketis bound to.- Returns:
- the socket address.
-