Package io.aeron.driver.media
Interface PortManager
- All Known Implementing Classes:
WildcardPortManager
public interface PortManager
Interface for managing ports in use by UdpChannelTransports.
-
Method Summary
Modifier and TypeMethodDescriptionvoidfreeManagedPort(InetSocketAddress bindAddress) Called after the bound socket is to be closed.getManagedPort(UdpChannel udpChannel, InetSocketAddress bindAddress) Called before an OS bind to adjust the bound address and to notify of the bind for the port manager.
-
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
Called after the bound socket is to be closed.- Parameters:
bindAddress- used for the bind previously.
-