-
- All Implemented Interfaces:
public class StunDiscoveryReportThe class is used to deliver results from a STUN Discovery Process. It contains information about the NAT Server (or firewall )this client is behind, and a mapped address value (if discovered)
-
-
Field Summary
Fields Modifier and Type Field Description public final static StringUNKNOWNpublic final static StringOPEN_INTERNETpublic final static StringUDP_BLOCKING_FIREWALLpublic final static StringSYMMETRIC_UDP_FIREWALLpublic final static StringFULL_CONE_NATpublic final static StringSYMMETRIC_NATpublic final static StringRESTRICTED_CONE_NATpublic final static StringPORT_RESTRICTED_CONE_NATprivate StringnatTypeprivate TransportAddresspublicAddress
-
Method Summary
Modifier and Type Method Description StringgetNatType()Returns the type of the NAT described in the report. voidsetNatType(String natType)Sets the type of the NAT indicated by the report. TransportAddressgetPublicAddress()Returns the public addressed discovered by a discovery process. voidsetPublicAddress(TransportAddress stunAddress)Sets a public address. booleanequals(Object obj)Compares this object with obj. StringtoString()Returns a readable representation of the report. -
-
Method Detail
-
getNatType
String getNatType()
Returns the type of the NAT described in the report.
-
setNatType
void setNatType(String natType)
Sets the type of the NAT indicated by the report.
- Parameters:
natType- the type of the NAT.
-
getPublicAddress
TransportAddress getPublicAddress()
Returns the public addressed discovered by a discovery process.
-
setPublicAddress
void setPublicAddress(TransportAddress stunAddress)
Sets a public address.
- Parameters:
stunAddress- An address that's accesible from everywhere.
-
equals
boolean equals(Object obj)
Compares this object with obj. Two reports are considered equal if and only if both have the same nat type and their public addresses are equal or are both null.
- Parameters:
obj- the object to compare against.
-
-
-
-