|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.fusesource.fabric.utils.Ports
public class Ports
| Field Summary | |
|---|---|
static int |
DEFAULT_HOST_SSH_PORT
|
static int |
DEFAULT_KARAF_SSH_PORT
|
static int |
DEFAULT_RMI_REGISTRY_PORT
|
static int |
DEFAULT_RMI_SERVER_PORT
|
static int |
DEFAULT_ZOOKEEPER_ELECTION_PORT
|
static int |
DEFAULT_ZOOKEEPER_PEER_PORT
|
static int |
DEFAULT_ZOOKEEPER_SERVER_PORT
|
static int |
MAX_PORT_NUMBER
|
static int |
MIN_PORT_NUMBER
|
static java.lang.String |
PORT_PATTERN
|
| Method Summary | |
|---|---|
static int |
extractPort(java.lang.String address)
Extracts the port from an addrees. |
static int |
findFreeLocalPort(java.util.List<java.lang.Integer> usedPorts,
int port,
boolean checkIfAvailable)
Finds a the next free local port, based on the list of used ports and the ability to directly check if port is free. |
static int |
findPort(java.util.Map<java.lang.String,java.util.List<java.lang.Integer>> usedPorts,
java.lang.String ip,
int port)
Finds a port based on the given ip and the used ports for that ip. |
static boolean |
isPortFree(int port)
Checks if a local port is free. |
static int |
mapPortToRange(int port,
int minimumPort,
int maximumPort)
Maps the target port inside a port range. |
static int |
mapPortToRange(int port,
java.lang.String minimumPort,
java.lang.String maximumPort)
Maps the target port inside a port range. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_HOST_SSH_PORT
public static final int DEFAULT_KARAF_SSH_PORT
public static final int DEFAULT_ZOOKEEPER_SERVER_PORT
public static final int DEFAULT_ZOOKEEPER_PEER_PORT
public static final int DEFAULT_ZOOKEEPER_ELECTION_PORT
public static final int DEFAULT_RMI_SERVER_PORT
public static final int DEFAULT_RMI_REGISTRY_PORT
public static final int MIN_PORT_NUMBER
public static final int MAX_PORT_NUMBER
public static final java.lang.String PORT_PATTERN
| Method Detail |
|---|
public static int findPort(java.util.Map<java.lang.String,java.util.List<java.lang.Integer>> usedPorts,
java.lang.String ip,
int port)
usedPorts - ip - port -
public static int findFreeLocalPort(java.util.List<java.lang.Integer> usedPorts,
int port,
boolean checkIfAvailable)
usedPorts - port - checkIfAvailable -
public static int mapPortToRange(int port,
int minimumPort,
int maximumPort)
port - minimumPort - maximumPort -
public static int mapPortToRange(int port,
java.lang.String minimumPort,
java.lang.String maximumPort)
port - minimumPort - maximumPort -
public static boolean isPortFree(int port)
port -
public static int extractPort(java.lang.String address)
address -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||