net.tomp2p.natpmp
Class ExternalAddressRequestMessage
java.lang.Object
net.tomp2p.natpmp.Message
net.tomp2p.natpmp.ExternalAddressRequestMessage
public class ExternalAddressRequestMessage
- extends Message
This class manages an External Address message. This class is thread-safe.
After instantiation, this class may be added to the message queue on the
NatPmpDevice.
- Author:
- flszen
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExternalAddressRequestMessage
public ExternalAddressRequestMessage(MessageResponseInterface listener)
- Constructs a new
ExternalAddressRequestMessage.
- Parameters:
listener - The MessageResponseInterface that will respond
to the message result.
getExternalAddress
public Inet4Address getExternalAddress()
throws NatPmpException
- Gets the NAT-PMP gateway's external address.
- Returns:
- The external
Inet4Address of the NAT-PMP gateway.
- Throws:
NatPmpException - Thrown when no response has been received or the
response parsing ran into some trouble.
Copyright © 2012. All Rights Reserved.