If multiple network interfaces are present, NetworkAdapter Services that correspond to each network interface must be registered. Network interface information service is set the following information as service property.
NETWORKADAPTER_TYPE : Network Interface TypeNETWORKADAPTER_DISPLAYNAME : Network Interface Display NameNETWORKADAPTER_NAME : Network Interface NameNETWORKADAPTER_HARDWAREADDRESS : Hardware AddressNETWORKADAPTER_IS_UP : Running status of Network InterfaceNETWORKADAPTER_IS_LOOPBACK : To check loopback interfaceNETWORKADAPTER_IS_POINTTOPOINT : To check point to point
interfaceNETWORKADAPTER_IS_VIRTUAL : To check virtual interfaceNETWORKADAPTER_SUPPORTS_MULTICAST : To check supports
multicastingNETWORKADAPTER_PARENT : The PID of parent Network InterfaceNETWORKADAPTER_SUBINTERFACE : The PID of sub Network InterfaceWhen a network interface becomes available, NetworkAdapter service associated with the network interface is registered with the service registry. If the network interface becomes unavailable, the corresponding NetworkAdapter service is unregistered.
When the attribute values of the network interface are set to the service property changes, NetworkAdapter service is updated. NetworkAdapter interface provides a method corresponding to java.net.NetworkInterface in order to provide information on the associated network interface. However, this interface method does not support the Static method. In addition, because NetworkInterface object or InetAddress object is registered in the service registry as NetworkAdapter and NetworkAddress, the NetworkAdapter interface does not provide a method to get those objects. NetworkAdapter provides a method to retrieve the value of an attribute of a network interface.
| Modifier and Type | Field and Description |
|---|---|
| public static final byte[] | EMPTY_BYTE_ARRAY
The value byte array of service property, when information is not available. |
| public static final String | EMPTY_STRING
The value string of service property, when information is not available. |
| public static final String[] | EMPTY_STRING_ARRAY
The value string array of service property, when information is not available. |
| public static final String | LAN
The string of network interface type which means the network interface to connect to a local area network. |
| public static final String | NETWORKADAPTER_DISPLAYNAME
The key string of "networkAdapter.displayName" service property. |
| public static final String | NETWORKADAPTER_HARDWAREADDRESS
The key string of "networkAdapter.hardwareAddress" service property. |
| public static final String | NETWORKADAPTER_IS_LOOPBACK
The key string of "networkAdapter.isLoopback" service property. |
| public static final String | NETWORKADAPTER_IS_POINTTOPOINT
The key string of "networkAdapter.isPointToPoint" service property. |
| public static final String | NETWORKADAPTER_IS_UP
The key string of "networkAdapter.isUp" service property. |
| public static final String | NETWORKADAPTER_IS_VIRTUAL
The key string of "networkAdapter.isVirtual" service property. |
| public static final String | NETWORKADAPTER_NAME
The key string of "networkAdapter.name" service property. |
| public static final String | NETWORKADAPTER_PARENT
The key string of "networkAdapter.parent" service property. |
| public static final String | NETWORKADAPTER_SUBINTERFACE
The key string of "networkAdapter.subInterface" service property. |
| public static final String | NETWORKADAPTER_SUPPORTS_MULTICAST
The key string of "networkAdapter.supportsMulticast" service property. |
| public static final String | NETWORKADAPTER_TYPE
The key string of "networkAdapter.type" service property. |
| public static final String | WAN
The string of network interface type which means the network interface to connect to an external network (i.e. Internet). |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: Network Interface display name, or null if "networkAdapter.displayname" service property value is empty.Returns the network interface display name of "networkAdapter.displayname" service property value. |
| public byte[] | Returns: Hardware Address, or null if "networkAdapter.hardwareAddress" service property value is empty.Returns the MAC address of "networkAdapter.hardwareAddress" service property value. |
| public int | Returns: The value of the MTU for that interface.Returns the Maximum Transmission Unit (MTU) of this interface. |
| public String | Returns: Network Interface Name, or null if "networkAdapter.name" service property value is empty.Returns the network interface name of "networkAdapter.name" service property value. |
| public String | Returns: Network Interface Type, or null if "networkAdapter.type" service property value is empty.Returns the network interface type of "networkAdapter.type" service property value. |
| public boolean | Returns: true if the interface is a loopback interface.Returns whether a network interface is a loopback interface. |
| public boolean | Returns: true if the interface is a point to point interface.Returns whether a network interface is a point to point interface. |
| public boolean | Returns: true if the interface is up and running.Returns whether a network interface is up and running. |
| public boolean | Returns: true if this interface is a virtual interface.Returns whether this interface is a virtual interface (also called subinterface). |
| public boolean | Returns: true if the interface supports Multicasting.Returns whether a network interface supports multicasting or not. |
| EMPTY_BYTE_ARRAY | back to summary |
|---|---|
| public static final byte[] EMPTY_BYTE_ARRAY The value byte array of service property, when information is not available. | |
| EMPTY_STRING | back to summary |
|---|---|
| public static final String EMPTY_STRING The value string of service property, when information is not available. | |
| EMPTY_STRING_ARRAY | back to summary |
|---|---|
| public static final String[] EMPTY_STRING_ARRAY The value string array of service property, when information is not available. | |
| LAN | back to summary |
|---|---|
| public static final String LAN The string of network interface type which means the network interface to connect to a local area network. | |
| NETWORKADAPTER_DISPLAYNAME | back to summary |
|---|---|
| public static final String NETWORKADAPTER_DISPLAYNAME The key string of "networkAdapter.displayName" service property.
Network Interface display name is specified. | |
| NETWORKADAPTER_HARDWAREADDRESS | back to summary |
|---|---|
| public static final String NETWORKADAPTER_HARDWAREADDRESS The key string of "networkAdapter.hardwareAddress" service property.
Hardware Address is specified. | |
| NETWORKADAPTER_IS_LOOPBACK | back to summary |
|---|---|
| public static final String NETWORKADAPTER_IS_LOOPBACK The key string of "networkAdapter.isLoopback" service property. The value is true when a network interface is a loopback interface, otherwise it is false. | |
| NETWORKADAPTER_IS_POINTTOPOINT | back to summary |
|---|---|
| public static final String NETWORKADAPTER_IS_POINTTOPOINT The key string of "networkAdapter.isPointToPoint" service property. The value is true when a network interface is a point to point interface, otherwise it is false. | |
| NETWORKADAPTER_IS_UP | back to summary |
|---|---|
| public static final String NETWORKADAPTER_IS_UP The key string of "networkAdapter.isUp" service property. The value is true when a network interface is up and running, otherwise it is false. | |
| NETWORKADAPTER_IS_VIRTUAL | back to summary |
|---|---|
| public static final String NETWORKADAPTER_IS_VIRTUAL The key string of "networkAdapter.isVirtual" service property. The value is true when a network interface is a virtual interface, otherwise it is false. | |
| NETWORKADAPTER_NAME | back to summary |
|---|---|
| public static final String NETWORKADAPTER_NAME The key string of "networkAdapter.name" service property.
Network Interface Name is specified. | |
| NETWORKADAPTER_PARENT | back to summary |
|---|---|
| public static final String NETWORKADAPTER_PARENT The key string of "networkAdapter.parent" service property.
Service PID of the NetworkAdapter service which is parent of this
NetworkAdapter is specified. | |
| NETWORKADAPTER_SUBINTERFACE | back to summary |
|---|---|
| public static final String NETWORKADAPTER_SUBINTERFACE The key string of "networkAdapter.subInterface" service property.
Service PID of the NetworkAdapter service which is subinterface of this
NetworkAdapter is specified. | |
| NETWORKADAPTER_SUPPORTS_MULTICAST | back to summary |
|---|---|
| public static final String NETWORKADAPTER_SUPPORTS_MULTICAST The key string of "networkAdapter.supportsMulticast" service property. The value is true when a network interface supports multicasting, otherwise it is false. | |
| NETWORKADAPTER_TYPE | back to summary |
|---|---|
| public static final String NETWORKADAPTER_TYPE The key string of "networkAdapter.type" service property. Network Interface Type is specified. | |
| WAN | back to summary |
|---|---|
| public static final String WAN The string of network interface type which means the network interface to connect to an external network (i.e. Internet). | |
| getDisplayName | back to summary |
|---|---|
| public String getDisplayName() Returns the network interface display name of "networkAdapter.displayname" service property value.
| |
| getHardwareAddress | back to summary |
|---|---|
| public byte[] getHardwareAddress() Returns the MAC address of "networkAdapter.hardwareAddress" service property value.
| |
| getMTU | back to summary |
|---|---|
| public int getMTU() throws SocketException Returns the Maximum Transmission Unit (MTU) of this interface.
| |
| getName | back to summary |
|---|---|
| public String getName() Returns the network interface name of "networkAdapter.name" service property value.
| |
| getNetworkAdapterType | back to summary |
|---|---|
| public String getNetworkAdapterType() Returns the network interface type of "networkAdapter.type" service property value.
| |
| isLoopback | back to summary |
|---|---|
| public boolean isLoopback() throws SocketException Returns whether a network interface is a loopback interface.
| |
| isPointToPoint | back to summary |
|---|---|
| public boolean isPointToPoint() throws SocketException Returns whether a network interface is a point to point interface.
| |
| isUp | back to summary |
|---|---|
| public boolean isUp() throws SocketException Returns whether a network interface is up and running.
| |
| isVirtual | back to summary |
|---|---|
| public boolean isVirtual() Returns whether this interface is a virtual interface (also called subinterface). Virtual interfaces are, on some systems, interfaces created as a child of a physical interface and given different settings (like address or MTU). Usually the name of the interface will the name of the parent followed by a colon (:) and a number identifying the child since there can be several virtual interfaces attached to a single physical interface.
| |
| supportsMulticast | back to summary |
|---|---|
| public boolean supportsMulticast() throws SocketException Returns whether a network interface supports multicasting or not.
| |