org.ocap.hn
Class NetworkInterface

java.lang.Object
  extended by org.ocap.hn.NetworkInterface

public class NetworkInterface
extends Object

This class represents a home network interface including MoCA, wired ethernet, and wireless ethernet. Reverse channel interfaces are not represented by objects of this class. For each wired ethernet, wireless ethernet, MoCA interface, or interface that is not a reverse channel interface the HNIMP SHALL create an instance of this class.


Field Summary
static int MOCA
          Network interface type for hard-wired and MoCA based.
static int UNKNOWN
          Unknown network type.
static int WIRED_ETHERNET
          Network interface type for hard-wired and ethernet based.
static int WIRELESS_ETHERNET
          Network interface type for wireless and ethernet based.
 
Constructor Summary
protected NetworkInterface()
          Protected constructor.
 
Method Summary
 String getDisplayName()
          Gets a humanly readable name for this interface, e.g.
 InetAddress getInetAddress()
          Gets the InetAddress of this interface.
 String getMacAddress()
          Gets the MAC address of this interface.
static NetworkInterface[] getNetworkInterfaces()
          Gets an array of NetworkInterface instances that represent all of the network interfaces supported by the device.
 int getType()
          Gets the type of this network interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN

public static final int UNKNOWN
Unknown network type.

See Also:
Constant Field Values

MOCA

public static final int MOCA
Network interface type for hard-wired and MoCA based.

See Also:
Constant Field Values

WIRED_ETHERNET

public static final int WIRED_ETHERNET
Network interface type for hard-wired and ethernet based.

See Also:
Constant Field Values

WIRELESS_ETHERNET

public static final int WIRELESS_ETHERNET
Network interface type for wireless and ethernet based.

See Also:
Constant Field Values
Constructor Detail

NetworkInterface

protected NetworkInterface()
Protected constructor.

Method Detail

getNetworkInterfaces

public static NetworkInterface[] getNetworkInterfaces()
Gets an array of NetworkInterface instances that represent all of the network interfaces supported by the device.

Returns:
An array of NetworkInterface instances.

getType

public int getType()
Gets the type of this network interface. Possibilities include UNKNOWN, MOCA, WIRED_ETHERNET, WIRELESS_ETHERNET.

Returns:
The type of this interface.

getDisplayName

public String getDisplayName()
Gets a humanly readable name for this interface, e.g. "ie0".

Returns:
The display name of this interface.

getInetAddress

public InetAddress getInetAddress()
Gets the InetAddress of this interface.

Returns:
The InetAddress of this interface.

getMacAddress

public String getMacAddress()
Gets the MAC address of this interface.

Returns:
The MAC address of this interface.


Copyright © 2011. All Rights Reserved.