org.littleshoot.stun.stack.message.attributes
Class AbstractStunAddressAttribute
java.lang.Object
org.littleshoot.stun.stack.message.attributes.AbstractStunAttribute
org.littleshoot.stun.stack.message.attributes.AbstractStunAddressAttribute
- All Implemented Interfaces:
- StunAddressAttribute, StunAttribute
- Direct Known Subclasses:
- MappedAddressAttribute, RelayAddressAttribute, RemoteAddressAttribute
public abstract class AbstractStunAddressAttribute
- extends AbstractStunAttribute
- implements StunAddressAttribute
Abstract class for all STUN attributes that include an address.
AbstractStunAddressAttribute
public AbstractStunAddressAttribute(StunAttributeType attributeType,
InetSocketAddress socketAddress)
- Creates a new mapped address attribute.
- Parameters:
attributeType - The type of the attribute.socketAddress - The IP and port to put in the attribute.
getInetSocketAddress
public InetSocketAddress getInetSocketAddress()
- Description copied from interface:
StunAddressAttribute
- Accessor for the address and port in the address.
- Specified by:
getInetSocketAddress in interface StunAddressAttribute
- Returns:
- The address and port.
getAddressFamily
public int getAddressFamily()
- Description copied from interface:
StunAddressAttribute
- Accessor for the family of the address.
- Specified by:
getAddressFamily in interface StunAddressAttribute
- Returns:
- The family of the address, either IPv4 or IPv6.
toString
public String toString()
- Overrides:
toString in class AbstractStunAttribute
Copyright © 2013 LittleShoot. All Rights Reserved.