Interface NetworkAddress


public interface NetworkAddress
This interface represents an IP address information.

NetworkAddress interface provides information of IP addresses available in which execution environment on a Network Interface Information Service bundle is running. IP address information service is set the following information as service property.

NetworkAddress service is registered with the service registry for each available IP address. When associated IP addresses are deleted, or the network interface to which the IP address is bound becomes unavailable, the NetworkAddress service is unregistered. When the associated IP address changes, NetworkAddress service is updated. The user bundle can detect the change of IP address by monitoring the registration or unregistering, updating of NetworkAddress service. Because IP addresses are bound to the network interface, if any, Service PID of the associated NetworkAdapter service and its network interface type are set to service property. NetworkAdapter service MUST be registered after the all associated NetworkAddress services are registered. On the other hand, when unregistering services, after associated NetworkAdapter service is unregistered, NetworkAddress of all related services are unregistered.

"ThreadSafe"
  • Field Details

    • EMPTY_INTEGER

      static final Integer EMPTY_INTEGER
      The value integer of service property, when information is not available.
    • NETWORKADAPTER_TYPE

      static final String NETWORKADAPTER_TYPE
      The key string of "networkAdapter.type" service property. Network Interface Type is specified.
      See Also:
    • IPADDRESS_VERSION

      static final String IPADDRESS_VERSION
      The key string of "ipAddress.version" service property. IP Address version is specified.
      See Also:
    • IPADDRESS_SCOPE

      static final String IPADDRESS_SCOPE
      The key string of "ipAddress.scope" service property. IP Address scope is specified.
      See Also:
    • IPADDRESS

      static final String IPADDRESS
      The key string of "ipAddress" service property. IP Address is specified.
      See Also:
    • SUBNETMASK_LENGTH

      static final String SUBNETMASK_LENGTH
      The key string of "subnetmask.length" service property.

      Subnet Mask Length(IPv4) or Prefix Length(IPv6) is specified. EMPTY_INTEGER if no length is available.

      See Also:
    • NETWORKADAPTER_PID

      static final String NETWORKADAPTER_PID
      The key string of "networkAdapter.pid" service property.

      Service PID of the interface information service to which it belongs is specified.

      See Also:
    • IPADDRESS_VERSION_4

      static final String IPADDRESS_VERSION_4
      The string of IP address version which means IP address version 4.
      See Also:
    • IPADDRESS_VERSION_6

      static final String IPADDRESS_VERSION_6
      The string of IP address version which means IP address version 6.
      See Also:
    • IPADDRESS_SCOPE_GLOBAL

      static final String IPADDRESS_SCOPE_GLOBAL
      The string of IP address scope which means global address.

      The global address is defined as the address other than the address defined in the RFC6890.

      See Also:
    • IPADDRESS_SCOPE_PRIVATE_USE

      static final String IPADDRESS_SCOPE_PRIVATE_USE
      The string of IP address scope which means "Private-Use Networks".

      See RFC6890 for the definition of "Private-Use Networks".

      See Also:
    • IPADDRESS_SCOPE_LOOPBACK

      static final String IPADDRESS_SCOPE_LOOPBACK
      The string of IP address scope which means "Loopback".

      See RFC6890 for the definition of "Loopback".

      See Also:
    • IPADDRESS_SCOPE_LINKLOCAL

      static final String IPADDRESS_SCOPE_LINKLOCAL
      The string of IP address scope which means "Link Local".

      See RFC6890 for the definition of "Link Local".

      See Also:
    • IPADDRESS_SCOPE_UNIQUE_LOCAL

      static final String IPADDRESS_SCOPE_UNIQUE_LOCAL
      The string of IP address scope which means "Unique-Local".

      See RFC6890 for the definition of "Unique-Local".

      See Also:
    • IPADDRESS_SCOPE_UNSPECIFIED

      static final String IPADDRESS_SCOPE_UNSPECIFIED
      The string of IP address scope which means "Unspecified Address".

      See RFC6890 for the definition of "Unspecified Address".

      See Also:
    • IPADDRESS_SCOPE_HOST

      static final String IPADDRESS_SCOPE_HOST
      The string of IP address scope which means "This host on this network".

      See RFC6890 for the definition of "This host on this network".

      See Also:
    • IPADDRESS_SCOPE_SHARED

      static final String IPADDRESS_SCOPE_SHARED
      The string of IP address scope which means "Shared Address Space".

      See RFC6890 for the definition of "Shared Address Space".

      See Also:
    • IPADDRESS_SCOPE_LINKED_SCOPED_UNICAST

      static final String IPADDRESS_SCOPE_LINKED_SCOPED_UNICAST
      The string of IP address scope which means "Linked-Scoped Unicast".

      See RFC6890 for the definition of "Linked-Scoped Unicast".

      See Also:
  • Method Details

    • getNetworkAdapterType

      String getNetworkAdapterType()
      Returns the network interface type of "networkAdapter.type" service property value.
      Returns:
      Network Interface Type, or null if "networkAdapter.type" service property value is empty.
    • getIpAddressVersion

      String getIpAddressVersion()
      Returns the IP address version of "ipaddress.version" service property value.
      Returns:
      IP Address Version, or null if "ipaddress.version" service property value is empty.
    • getIpAddressScope

      String getIpAddressScope()
      Returns the IP address scope of "ipaddress.scope" service property value.
      Returns:
      IP Address Scope, or null if "ipaddress.scope" service property value is empty.
    • getIpAddress

      String getIpAddress()
      Returns the IP address of "ipaddress" service property value.
      Returns:
      IP Address string, or null if "ipaddress" service property value is empty.
    • getInetAddress

      InetAddress getInetAddress()
      Returns the InetAddress object of this IP address.

      Returned object is created from "ipaddress" service property value.

      Returns:
      InetAddress, or null if "ipaddress" service property value is empty.
    • getSubnetMaskLength

      int getSubnetMaskLength()
      Returns the "subnetmask.length" service property value.
      Returns:
      Subnet Mask Length(IPv4) or Prefix Length(IPv6), or -1 if "subnetmask.length" service property value is empty.
    • getNetworkAdapterPid

      String getNetworkAdapterPid()
      Returns the "networkadapter.pid" service property value.
      Returns:
      Service ID of the interface information service to which it belongs, or null if "networkadapter.pid" service property value is empty.