public class WildcardPortManager extends Object implements PortManager
Does not track per interface, but as a range over all interfaces.
| Modifier and Type | Field and Description |
|---|---|
static int[] |
EMPTY_PORT_RANGE |
| Constructor and Description |
|---|
WildcardPortManager(int[] portRange,
boolean isSender)
Instantiate a wildcard port manager with the given port range.
|
| Modifier and Type | Method and Description |
|---|---|
void |
freeManagedPort(InetSocketAddress bindAddress)
Called after the bound socket is to be closed.
|
InetSocketAddress |
getManagedPort(UdpChannel udpChannel,
InetSocketAddress bindAddress)
Called before an OS bind to adjust the binded address and to notify of the bind for the port manager.
|
static int[] |
parsePortRange(String value)
Parse a port range in the format "low high".
|
public WildcardPortManager(int[] portRange,
boolean isSender)
portRange - for the port managerisSender - for this port managerpublic InetSocketAddress getManagedPort(UdpChannel udpChannel, InetSocketAddress bindAddress) throws BindException
getManagedPort in interface PortManagerudpChannel - for the UDP endpoint being bound.bindAddress - for the bind.BindException - if the bind should not be performed.public void freeManagedPort(InetSocketAddress bindAddress)
freeManagedPort in interface PortManagerbindAddress - used for the bind previously.public static int[] parsePortRange(String value)
value - for the port range in string format.Copyright © 2014-2023 Real Logic Limited. All Rights Reserved.