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
  • Method Summary

    Modifier and Type Method Description
    int getPort()
    Return the port this server is listening on.
    java.net.SocketAddress getServerSocketAddress()
    Return the SocketAddress that the underlying ServerSocket is 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

      java.net.SocketAddress getServerSocketAddress()
      Return the SocketAddress that the underlying ServerSocket is bound to.
      Returns:
      the socket address.