public interface InterfaceService extends ListenerService<InterfaceEvent,InterfaceListener>
Modifier and Type | Method and Description |
---|---|
Interface |
getInterfaceByName(ConnectPoint connectPoint,
String name)
Returns the interface with the given name.
|
Set<Interface> |
getInterfaces()
Returns the set of all interfaces in the system.
|
Set<Interface> |
getInterfacesByIp(IpAddress ip)
Returns the set of interfaces with the given IP address.
|
Set<Interface> |
getInterfacesByPort(ConnectPoint port)
Returns the set of interfaces configured on the given port.
|
Set<Interface> |
getInterfacesByVlan(VlanId vlan)
Returns the set of interfaces in the given VLAN.
|
Interface |
getMatchingInterface(IpAddress ip)
Returns an interface that has an address that is in the same subnet as
the given IP address.
|
Set<Interface> |
getMatchingInterfaces(IpAddress ip)
Returns all interfaces that have an address that is in the same
subnet as the given IP address.
|
default VlanId |
getNativeVlanId(ConnectPoint connectPoint)
Returns native VLAN configured on given connect point.
|
default Set<VlanId> |
getTaggedVlanId(ConnectPoint connectPoint)
Returns tagged VLAN configured on given connect point.
|
default VlanId |
getUntaggedVlanId(ConnectPoint connectPoint)
Returns untagged VLAN configured on given connect point.
|
default boolean |
inUse(VlanId vlanId)
Returns true if given vlanId is in use due to configuration on any of the
interfaces in the system.
|
default boolean |
isConfigured(ConnectPoint connectPoint)
Returns true if given connectPoint has an IP address or vlan configured
on any of its interfaces.
|
addListener, removeListener
Set<Interface> getInterfaces()
Interface getInterfaceByName(ConnectPoint connectPoint, String name)
connectPoint
- connect point of the interfacename
- name of the interfaceSet<Interface> getInterfacesByPort(ConnectPoint port)
port
- connect pointSet<Interface> getInterfacesByIp(IpAddress ip)
ip
- IP addressSet<Interface> getInterfacesByVlan(VlanId vlan)
vlan
- VLAN ID of the interfacesInterface getMatchingInterface(IpAddress ip)
ip
- IP address to find matching subnet interface forSet<Interface> getMatchingInterfaces(IpAddress ip)
ip
- IP address to find matching subnet interface fordefault VlanId getUntaggedVlanId(ConnectPoint connectPoint)
Only returns the first match if there are multiple untagged VLAN configured on the connect point.
connectPoint
- connect pointdefault Set<VlanId> getTaggedVlanId(ConnectPoint connectPoint)
Returns all matches if there are multiple tagged VLAN configured on the connect point.
connectPoint
- connect pointdefault VlanId getNativeVlanId(ConnectPoint connectPoint)
Only returns the first match if there are multiple native VLAN configured on the connect point.
connectPoint
- connect pointdefault boolean isConfigured(ConnectPoint connectPoint)
connectPoint
- the port on a devicedefault boolean inUse(VlanId vlanId)
vlanId
- the vlan id being queried