public class StunDiscoveryReport extends Object
Modifier and Type | Field and Description |
---|---|
static String |
FULL_CONE_NAT
NAT type is full cone.
|
private String |
natType |
static String |
OPEN_INTERNET
Means, there's no NAT or firewall.
|
static String |
PORT_RESTRICTED_CONE_NAT
NAT type is port restricted cone.
|
private TransportAddress |
publicAddress |
static String |
RESTRICTED_CONE_NAT
NAT type is Restricted Cone.
|
static String |
SYMMETRIC_NAT
We are behind a symmetric nat.
|
static String |
SYMMETRIC_UDP_FIREWALL
Means we are behind a symmetric udp firewall.
|
static String |
UDP_BLOCKING_FIREWALL
Indicates that UDP communication is not possible.
|
static String |
UNKNOWN
Indicates that NAT detection has failed or not yet initiated.
|
Constructor and Description |
---|
StunDiscoveryReport()
Creates a discovery report with natType = UNKNOWN and a null public
address.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Compares this object with obj.
|
String |
getNatType()
Returns the type of the NAT described in the report.
|
TransportAddress |
getPublicAddress()
Returns the public addressed discovered by a discovery process.
|
(package private) void |
setNatType(String natType)
Sets the type of the NAT indicated by the report.
|
(package private) void |
setPublicAddress(TransportAddress stunAddress)
Sets a public address.
|
String |
toString()
Returns a readable representation of the report.
|
public static final String UNKNOWN
public static final String OPEN_INTERNET
public static final String UDP_BLOCKING_FIREWALL
public static final String SYMMETRIC_UDP_FIREWALL
public static final String FULL_CONE_NAT
public static final String SYMMETRIC_NAT
public static final String RESTRICTED_CONE_NAT
public static final String PORT_RESTRICTED_CONE_NAT
private String natType
private TransportAddress publicAddress
StunDiscoveryReport()
public String getNatType()
void setNatType(String natType)
natType
- the type of the NAT.public TransportAddress getPublicAddress()
void setPublicAddress(TransportAddress stunAddress)
stunAddress
- An address that's accesible from everywhere.public boolean equals(Object obj)
Copyright © 2018. All rights reserved.