public class DefaultInterface extends Object implements Interface, Transportable<DefaultInterface,String>
Interface
. The values are discovered from
the device and none are configurable.Interface.State
Constructor and Description |
---|
DefaultInterface(DefaultInterface netIf)
Copy constructor
|
DefaultInterface(InterfaceId id,
InterfaceInfo info)
Constructor to combine id and info.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
<E extends DefaultInterface> |
getId()
Gets the id of this object.
|
InterfaceInfo |
getInfo() |
int |
hashCode() |
ElementId |
hostedBy()
Parent network element to which this interface belongs.
|
InterfaceId |
id()
Device unique identifier of the interface/port.
|
Set<IpAddress> |
ipAddresses()
Optional IP Address(es) associated with the interface.
|
boolean |
isBlocked()
Returns true if this port is prevented from being used for flooding.
|
boolean |
isEnabled()
Returns true only if the port is administratively and
operationally enabled
|
MacAddress |
mac()
Optional Interface/port physical address.
|
String |
name()
Label or a friendly name, which can be set on the device.
|
ElementId |
realizedByElement()
Optional reference to the parent element through which this one
is realized.
|
InterfaceId |
realizedByInterface()
Optional reference to the parent interface through which this one
is realized.
|
Set<Interface.State> |
state()
Interface/port state.
|
String |
toString() |
IfType |
type()
Interface/port type as defined in IfType
|
public DefaultInterface(InterfaceId id, InterfaceInfo info)
id
- interface idinfo
- interface info from devicepublic DefaultInterface(DefaultInterface netIf)
netIf
- interface to copypublic Set<Interface.State> state()
Interface
public boolean isEnabled()
Interface
public boolean isBlocked()
Interface
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
.
public InterfaceId id()
Interface
public String name()
Interface
public ElementId hostedBy()
Interface
public ElementId realizedByElement()
Interface
realizedByElement
in interface Interface
public InterfaceId realizedByInterface()
Interface
realizedByInterface
in interface Interface
public MacAddress mac()
Interface
public IfType type()
Interface
public Set<IpAddress> ipAddresses()
Interface
ipAddresses
in interface Interface
public InterfaceInfo getInfo()
public <E extends DefaultInterface> Id<E,String> getId()
Transportable
A type for the identified must be specified to retrieve the id because
identified objects might be inheritable. For example, assume
Employee
extends from Person
and Person
implements Transportable<Person, Long>
. The following code
would be possible.
Id<Person, Long> id = employee.getId(); Id<Employee, Long> id = employee.getId();
getId
in interface Transportable<DefaultInterface,String>
Copyright © 2015. All Rights Reserved.