Top Description Fields Methods
org.osgi.service.networkadapter

public Interface NetworkAddress

Imports
java.net.InetAddress

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.

Author
$Id: 8a0613ef45629927ec3b0da834273511e05521da $

Field Summary

Modifier and TypeField and Description
public static final Integer
EMPTY_INTEGER

The value integer of service property, when information is not available.

public static final String
IPADDRESS

The key string of "ipAddress" service property.

public static final String
IPADDRESS_SCOPE

The key string of "ipAddress.scope" service property.

public static final String
IPADDRESS_SCOPE_GLOBAL

The string of IP address scope which means global address.

public static final String
IPADDRESS_SCOPE_HOST

The string of IP address scope which means "This host on this network".

public static final String
IPADDRESS_SCOPE_LINKED_SCOPED_UNICAST

The string of IP address scope which means "Linked-Scoped Unicast".

public static final String
IPADDRESS_SCOPE_LINKLOCAL

The string of IP address scope which means "Link Local".

public static final String
IPADDRESS_SCOPE_LOOPBACK

The string of IP address scope which means "Loopback".

public static final String
IPADDRESS_SCOPE_PRIVATE_USE

The string of IP address scope which means "Private-Use Networks".

public static final String
IPADDRESS_SCOPE_SHARED

The string of IP address scope which means "Shared Address Space".

public static final String
IPADDRESS_SCOPE_UNIQUE_LOCAL

The string of IP address scope which means "Unique-Local".

public static final String
IPADDRESS_SCOPE_UNSPECIFIED

The string of IP address scope which means "Unspecified Address".

public static final String
IPADDRESS_VERSION

The key string of "ipAddress.version" service property.

public static final String
IPADDRESS_VERSION_4

The string of IP address version which means IP address version 4.

public static final String
IPADDRESS_VERSION_6

The string of IP address version which means IP address version 6.

public static final String
NETWORKADAPTER_PID

The key string of "networkAdapter.pid" service property.

public static final String
NETWORKADAPTER_TYPE

The key string of "networkAdapter.type" service property.

public static final String
SUBNETMASK_LENGTH

The key string of "subnetmask.length" service property.

Method Summary

Modifier and TypeMethod and Description
public InetAddress

Returns:

InetAddress, or null if "ipaddress" service property value is empty.
getInetAddress
()

Returns the InetAddress object of this IP address.

public String

Returns:

IP Address string, or null if "ipaddress" service property value is empty.
getIpAddress
()

Returns the IP address of "ipaddress" service property value.

public String

Returns:

IP Address Scope, or null if "ipaddress.scope" service property value is empty.
getIpAddressScope
()

Returns the IP address scope of "ipaddress.scope" service property value.

public String

Returns:

IP Address Version, or null if "ipaddress.version" service property value is empty.
getIpAddressVersion
()

Returns the IP address version of "ipaddress.version" service property value.

public String

Returns:

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

Returns the "networkadapter.pid" service property value.

public String

Returns:

Network Interface Type, or null if "networkAdapter.type" service property value is empty.
getNetworkAdapterType
()

Returns the network interface type of "networkAdapter.type" service property value.

public int

Returns:

Subnet Mask Length(IPv4) or Prefix Length(IPv6), or -1 if "subnetmask.length" service property value is empty.
getSubnetMaskLength
()

Returns the "subnetmask.length" service property value.

Field Detail

EMPTY_INTEGERback to summary
public static final Integer EMPTY_INTEGER

The value integer of service property, when information is not available.

IPADDRESSback to summary
public static final String IPADDRESS

The key string of "ipAddress" service property. IP Address is specified.

IPADDRESS_SCOPEback to summary
public static final String IPADDRESS_SCOPE

The key string of "ipAddress.scope" service property. IP Address scope is specified.

IPADDRESS_SCOPE_GLOBALback to summary
public 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.

IPADDRESS_SCOPE_HOSTback to summary
public 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".

IPADDRESS_SCOPE_LINKED_SCOPED_UNICASTback to summary
public 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".

IPADDRESS_SCOPE_LINKLOCALback to summary
public static final String IPADDRESS_SCOPE_LINKLOCAL

The string of IP address scope which means "Link Local".

See RFC6890 for the definition of "Link Local".

IPADDRESS_SCOPE_LOOPBACKback to summary
public static final String IPADDRESS_SCOPE_LOOPBACK

The string of IP address scope which means "Loopback".

See RFC6890 for the definition of "Loopback".

IPADDRESS_SCOPE_PRIVATE_USEback to summary
public 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".

IPADDRESS_SCOPE_SHAREDback to summary
public 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".

IPADDRESS_SCOPE_UNIQUE_LOCALback to summary
public 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".

IPADDRESS_SCOPE_UNSPECIFIEDback to summary
public static final String IPADDRESS_SCOPE_UNSPECIFIED

The string of IP address scope which means "Unspecified Address".

See RFC6890 for the definition of "Unspecified Address".

IPADDRESS_VERSIONback to summary
public static final String IPADDRESS_VERSION

The key string of "ipAddress.version" service property. IP Address version is specified.

IPADDRESS_VERSION_4back to summary
public static final String IPADDRESS_VERSION_4

The string of IP address version which means IP address version 4.

IPADDRESS_VERSION_6back to summary
public static final String IPADDRESS_VERSION_6

The string of IP address version which means IP address version 6.

NETWORKADAPTER_PIDback to summary
public 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.

NETWORKADAPTER_TYPEback to summary
public static final String NETWORKADAPTER_TYPE

The key string of "networkAdapter.type" service property. Network Interface Type is specified.

SUBNETMASK_LENGTHback to summary
public 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.

Method Detail

getInetAddressback to summary
public InetAddress getInetAddress()

Returns the InetAddress object of this IP address.

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

Returns:InetAddress

InetAddress, or null if "ipaddress" service property value is empty.

getIpAddressback to summary
public String getIpAddress()

Returns the IP address of "ipaddress" service property value.

Returns:String

IP Address string, or null if "ipaddress" service property value is empty.

getIpAddressScopeback to summary
public String getIpAddressScope()

Returns the IP address scope of "ipaddress.scope" service property value.

Returns:String

IP Address Scope, or null if "ipaddress.scope" service property value is empty.

getIpAddressVersionback to summary
public String getIpAddressVersion()

Returns the IP address version of "ipaddress.version" service property value.

Returns:String

IP Address Version, or null if "ipaddress.version" service property value is empty.

getNetworkAdapterPidback to summary
public String getNetworkAdapterPid()

Returns the "networkadapter.pid" service property value.

Returns:String

Service ID of the interface information service to which it belongs, or null if "networkadapter.pid" service property value is empty.

getNetworkAdapterTypeback to summary
public String getNetworkAdapterType()

Returns the network interface type of "networkAdapter.type" service property value.

Returns:String

Network Interface Type, or null if "networkAdapter.type" service property value is empty.

getSubnetMaskLengthback to summary
public int getSubnetMaskLength()

Returns the "subnetmask.length" service property value.

Returns:int

Subnet Mask Length(IPv4) or Prefix Length(IPv6), or -1 if "subnetmask.length" service property value is empty.