public class DefaultInterfaceInfo extends Object implements InterfaceInfo
InterfaceInfo
. Information is discovered
from the device and not configurable.Constructor and Description |
---|
DefaultInterfaceInfo(DefaultInterfaceInfo info)
Copy Constructor
|
DefaultInterfaceInfo(ElementId hostedBy,
BigPortNumber id)
Constructs an Interface Info object.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
int |
hashCode() |
ElementId |
hostedBy()
Parent network element to which this interface belongs.
|
BigPortNumber |
id()
Interface/port index.
|
Set<IpAddress> |
ipAddresses()
Optional IP Address(es) associated with the interface.
|
DefaultInterfaceInfo |
ipAddresses(Set<IpAddress> ipAddresses)
Modify the interface ip addresses
|
boolean |
isBlocked()
Returns true if this port is prevented from being used for flooding.
|
boolean |
isEnabled()
Returns true if the port is administratively enabled.
|
MacAddress |
mac()
Optional Interface/port physical address.
|
DefaultInterfaceInfo |
mac(MacAddress mac)
Modify the interface mac address
|
String |
name()
Label or a friendly name, which can be set on the device.
|
DefaultInterfaceInfo |
name(String name)
Modify the interface name
|
ElementId |
realizedByElement()
Optional reference to the parent interface through which this one
is realized.
|
DefaultInterfaceInfo |
realizedByElement(ElementId realizedBy)
Modify the element realized by
|
InterfaceId |
realizedByInterface()
Optional reference to the parent interface through which this one
is realized.
|
DefaultInterfaceInfo |
realizedByInterface(InterfaceId realizedBy)
Modify the interface realized by
|
Set<Interface.State> |
state()
Interface/port state.
|
DefaultInterfaceInfo |
state(Set<Interface.State> state)
Modify the interface state
|
String |
toDebugString()
Provides a little more detailed information about this object.
|
String |
toString() |
IfType |
type()
Interface/port type as defined in IfType
|
DefaultInterfaceInfo |
type(IfType type)
Modify the interface type
|
public DefaultInterfaceInfo(ElementId hostedBy, BigPortNumber id)
hostedBy
- device hosting interfaceid
- interface indexpublic DefaultInterfaceInfo(DefaultInterfaceInfo info)
info
- original info to copypublic DefaultInterfaceInfo state(Set<Interface.State> state)
state
- interface statepublic Set<Interface.State> state()
InterfaceInfo
state
in interface InterfaceInfo
public boolean isEnabled()
InterfaceInfo
isEnabled
in interface InterfaceInfo
public boolean isBlocked()
InterfaceInfo
The "blocked" flag indicates that a switch protocol outside of
OpenFlow, such as 802.1D Spanning Tree, is preventing the use of
the port with Port.FLOOD
.
isBlocked
in interface InterfaceInfo
public DefaultInterfaceInfo name(String name)
name
- interface namepublic String name()
InterfaceInfo
name
in interface InterfaceInfo
public ElementId hostedBy()
InterfaceInfo
hostedBy
in interface InterfaceInfo
public DefaultInterfaceInfo realizedByElement(ElementId realizedBy)
realizedBy
- Element (physical) that realizes this interfacepublic ElementId realizedByElement()
InterfaceInfo
realizedByElement
in interface InterfaceInfo
public DefaultInterfaceInfo realizedByInterface(InterfaceId realizedBy)
realizedBy
- Interface (physical) that realizes this interfacepublic InterfaceId realizedByInterface()
InterfaceInfo
realizedByInterface
in interface InterfaceInfo
public DefaultInterfaceInfo mac(MacAddress mac)
mac
- Interface mac addresspublic MacAddress mac()
InterfaceInfo
mac
in interface InterfaceInfo
public DefaultInterfaceInfo type(IfType type)
type
- Interface typepublic IfType type()
InterfaceInfo
type
in interface InterfaceInfo
public DefaultInterfaceInfo ipAddresses(Set<IpAddress> ipAddresses)
ipAddresses
- Interface ip addressespublic Set<IpAddress> ipAddresses()
InterfaceInfo
ipAddresses
in interface InterfaceInfo
public BigPortNumber id()
InterfaceInfo
id
in interface InterfaceInfo
public String toDebugString()
Copyright © 2015. All Rights Reserved.