com.eurotech.framework.net
Interface ConnectionInfo


public interface ConnectionInfo

Interface for network interface 'connection info'. At runtime an interface may be associated with gateways or DNS but the interface itself may not be active. If this is the case the ConnectionInfo class is used to keep all relevant information in the event that this interface should become the active one. This is necessary because many operating systems to not persist this information.


Method Summary
 List<IP4Address> getDnsServers()
          Gets the DNS addresses associated with this interface
 IP4Address getGateway()
          Gets the gateway address associated with this interface
 String getIfaceName()
          Gets the interface name associated with this connection information
 IP4Address getIpAddress()
          Reports IP address
 

Method Detail

getGateway

IP4Address getGateway()
Gets the gateway address associated with this interface

Returns:
A IP4Address representing the gateway if it is not null

getDnsServers

List<IP4Address> getDnsServers()
Gets the DNS addresses associated with this interface

Returns:
A List of IP4Address objects representing the DNS of this interface. If there are none it returns an empty list.

getIfaceName

String getIfaceName()
Gets the interface name associated with this connection information

Returns:
The interface name associated with this connection information

getIpAddress

IP4Address getIpAddress()
Reports IP address

Returns:
IP address as IP4Address


Copyright © 2013. All Rights Reserved.