| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | DNSDatagramChannelFactory.
The dynamic allocation port range (aka ephemeral ports), as configured on the system. |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv final int | |
| pack-priv final ProtocolFamily | |
| pack-priv static final int | |
| pack-priv final DNSDatagramChannelFactory. | |
| pack-priv int | |
| pack-priv int | |
| pack-priv static final int | |
| pack-priv final Random | |
| pack-priv int | |
| pack-priv static final int | |
| pack-priv final int | |
| pack-priv int |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private boolean | |
| private static int | |
| private static int | |
| pack-priv synchronized boolean | |
| pack-priv synchronized boolean | |
| pack-priv synchronized boolean | |
| public synchronized DatagramChannel | Returns: A new DatagramChannel bound to a random port.Opens a datagram socket listening to the wildcard address on a random port. |
| private DatagramChannel | |
| private DatagramChannel |
| BIT_DEVIATION | back to summary |
|---|---|
| pack-priv static final int BIT_DEVIATION | |
| DEVIATION | back to summary |
|---|---|
| pack-priv static final int DEVIATION | |
| deviation | back to summary |
|---|---|
| pack-priv final int deviation | |
| family | back to summary |
|---|---|
| pack-priv final ProtocolFamily family | |
| HISTORY | back to summary |
|---|---|
| pack-priv static final int HISTORY | |
| history | back to summary |
|---|---|
| pack-priv final DNSDatagramChannelFactory. | |
| lastport | back to summary |
|---|---|
| pack-priv int lastport | |
| lastSystemAllocated | back to summary |
|---|---|
| pack-priv int lastSystemAllocated | |
| MAX_RANDOM_TRIES | back to summary |
|---|---|
| pack-priv static final int MAX_RANDOM_TRIES | |
| random | back to summary |
|---|---|
| pack-priv final Random random | |
| suitablePortCount | back to summary |
|---|---|
| pack-priv int suitablePortCount | |
| THRESHOLD | back to summary |
|---|---|
| pack-priv static final int THRESHOLD | |
| thresholdCount | back to summary |
|---|---|
| pack-priv final int thresholdCount | |
| unsuitablePortCount | back to summary |
|---|---|
| pack-priv int unsuitablePortCount | |
| DNSDatagramChannelFactory | back to summary |
|---|---|
| pack-priv DNSDatagramChannelFactory() | |
| DNSDatagramChannelFactory | back to summary |
|---|---|
| pack-priv DNSDatagramChannelFactory(Random random) | |
| DNSDatagramChannelFactory | back to summary |
|---|---|
| pack-priv DNSDatagramChannelFactory(Random random, ProtocolFamily family, int deviation, int threshold) | |
| farEnough | back to summary |
|---|---|
| private boolean farEnough(int port) | |
| findFirstFreePort | back to summary |
|---|---|
| private static int findFirstFreePort() | |
| getLocalPort | back to summary |
|---|---|
| private static int getLocalPort(DatagramChannel dc) throws IOException | |
| isUndecided | back to summary |
|---|---|
| pack-priv synchronized boolean isUndecided() | |
| isUsingJavaPortRandomization | back to summary |
|---|---|
| pack-priv synchronized boolean isUsingJavaPortRandomization() | |
| isUsingNativePortRandomization | back to summary |
|---|---|
| pack-priv synchronized boolean isUsingNativePortRandomization() | |
| open | back to summary |
|---|---|
| public synchronized DatagramChannel open() throws IOException Opens a datagram socket listening to the wildcard address on a random port. If the underlying OS supports UDP port randomization out of the box (if binding a socket to port 0 binds it to a random port) then the underlying OS implementation is used. Otherwise, this method will allocate and bind a socket on a randomly selected ephemeral port in the dynamic range.
| |
| openDefault | back to summary |
|---|---|
| private DatagramChannel openDefault() throws IOException | |
| openRandom | back to summary |
|---|---|
| private DatagramChannel openRandom() throws IOException | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv static final int |
| Access | Constructor and Description |
|---|---|
| private |
| LOWER | back to summary |
|---|---|
| pack-priv static final int LOWER | |
| RANGE | back to summary |
|---|---|
| pack-priv static final int RANGE | |
| UPPER | back to summary |
|---|---|
| pack-priv static final int UPPER | |
| EphemeralPortRange | back to summary |
|---|---|
| private EphemeralPortRange() | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final int | |
| pack-priv int | |
| pack-priv final int[] | |
| pack-priv final Random |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | |
| public boolean | |
| public boolean |
| capacity | back to summary |
|---|---|
| pack-priv final int capacity | |
| index | back to summary |
|---|---|
| pack-priv int index | |
| ports | back to summary |
|---|---|
| pack-priv final int[] ports | |
| random | back to summary |
|---|---|
| pack-priv final Random random | |
| PortHistory | back to summary |
|---|---|
| pack-priv PortHistory(int capacity, Random random) | |
| add | back to summary |
|---|---|
| public boolean add(int port) | |
| contains | back to summary |
|---|---|
| public boolean contains(int port) | |
| offer | back to summary |
|---|---|
| public boolean offer(int port) | |