org.apache.openejb.util
Class NetworkUtil
java.lang.Object
org.apache.openejb.util.NetworkUtil
public final class NetworkUtil
- extends Object
TODO: this class is no more an utility class (static)
and should be rewritten to get a config + state
-> listOfPorts with release(port) method (otherwise caching makes half of usages broken)
-> lockFile
-> minPort/maxPort
-> ...
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TOMEE_LOCK_FILE
public static final String TOMEE_LOCK_FILE
- Lock file property name
- See Also:
- Constant Field Values
RANDOM
public static final int[] RANDOM
PORT_MIN
public static final int PORT_MIN
- See Also:
- Constant Field Values
PORT_MAX
public static final int PORT_MAX
- See Also:
- Constant Field Values
EVICTION_TIMEOUT
public static final int EVICTION_TIMEOUT
clearLockFile
public static void clearLockFile()
getNextAvailablePortInDefaultRange
public static int getNextAvailablePortInDefaultRange()
getNextAvailablePort
public static int getNextAvailablePort()
getNextAvailablePort
public static int getNextAvailablePort(int[] portList)
getNextAvailablePort
public static int getNextAvailablePort(int min,
int max,
Collection<Integer> excluded,
Collection<NetworkUtil.LastPort> lastPorts)
getNextAvailablePort
public static int getNextAvailablePort(int min,
int max,
Collection<Integer> excluded)
getLocalAddress
public static String getLocalAddress(String start,
String end)
isLocalAddress
public static boolean isLocalAddress(String addr)
isLocalAddress
public static boolean isLocalAddress(InetAddress addr)
Copyright © 1999–2015 The Apache Software Foundation. All rights reserved.