public abstract class PortRange
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected int |
defaultPort |
protected int |
portMax |
protected int |
portMin |
protected java.lang.String |
type |
Constructor and Description |
---|
PortRange(int portMin,
int portMax,
int defaultPort,
java.lang.String type)
Port range constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getDefaultPort()
Default port getter
|
boolean |
isPortInRange(int port)
test if port given correspond a range : registered ports, can be used without superuser privileges
|
java.lang.String |
toString()
To String
|
protected int portMax
protected int portMin
protected int defaultPort
protected java.lang.String type
public PortRange(int portMin, int portMax, int defaultPort, java.lang.String type)
portMin
- minimum portportMax
- maximum portdefaultPort
- default porttype
- type of rangepublic boolean isPortInRange(int port)
public java.lang.String toString()
toString
in class java.lang.Object
public int getDefaultPort()