Example usage for java.net Inet6Address getHostAddress

List of usage examples for java.net Inet6Address getHostAddress

Introduction

In this page you can find the example usage for java.net Inet6Address getHostAddress.

Prototype

@Override
public String getHostAddress() 

Source Link

Document

Returns the IP address string in textual presentation.

Usage

From source file:net.fenyo.gnetwatch.targets.TargetIPv6.java

/**
 * Constructor.//from  w w w  . ja v a  2s.c om
 * @param name target name.
 * @param address IPv6 address.
 * @param SNMPManager snmp manager.
 * @throws AlgorithmException exception.
 */
// GUI thread
public TargetIPv6(final String name, final Inet6Address address, final SNMPManager snmp_manager)
        throws AlgorithmException {
    super(name);
    if (address == null)
        throw new AlgorithmException("name is null");
    this.address = address;
    snmp_querier = snmp_manager != null ? snmp_manager.getQuerier(address) : null;
    setItem(address.getHostAddress());
    ip_querier = new IPQuerier(address);
    // may last a long time (DNS resolver)
    // setDescription(address.getCanonicalHostName());
}