Interface PortManager

All Known Implementing Classes:
WildcardPortManager

public interface PortManager
Interface for managing ports in use by UdpChannelTransports.
  • Method Details

    • getManagedPort

      InetSocketAddress getManagedPort(UdpChannel udpChannel, InetSocketAddress bindAddress) throws BindException
      Called before an OS bind to adjust the bound address and to notify of the bind for the port manager.
      Parameters:
      udpChannel - for the UDP endpoint being bound.
      bindAddress - for the bind.
      Returns:
      InetSocketAddress to use for the bind.
      Throws:
      BindException - if the bind should not be performed.
    • freeManagedPort

      void freeManagedPort(InetSocketAddress bindAddress)
      Called after the bound socket is to be closed.
      Parameters:
      bindAddress - used for the bind previously.