Package org.onosproject.net.intf
Interface InterfaceService
- 
- All Superinterfaces:
- ListenerService<InterfaceEvent,InterfaceListener>
 
 public interface InterfaceService extends ListenerService<InterfaceEvent,InterfaceListener> Service for interacting with interfaces.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description InterfacegetInterfaceByName(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.InterfacegetMatchingInterface(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 VlanIdgetNativeVlanId(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 VlanIdgetUntaggedVlanId(ConnectPoint connectPoint)Returns untagged VLAN configured on given connect point.default booleaninUse(VlanId vlanId)Returns true if given vlanId is in use due to configuration on any of the interfaces in the system.default booleanisConfigured(ConnectPoint connectPoint)Returns true if given connectPoint has an IP address or vlan configured on any of its interfaces.- 
Methods inherited from interface org.onosproject.event.ListenerServiceaddListener, removeListener
 
- 
 
- 
- 
- 
Method Detail- 
getInterfacesSet<Interface> getInterfaces() Returns the set of all interfaces in the system.- Returns:
- set of interfaces
 
 - 
getInterfaceByNameInterface getInterfaceByName(ConnectPoint connectPoint, String name) Returns the interface with the given name.- Parameters:
- connectPoint- connect point of the interface
- name- name of the interface
- Returns:
- interface if it exists, otherwise null
 
 - 
getInterfacesByPortSet<Interface> getInterfacesByPort(ConnectPoint port) Returns the set of interfaces configured on the given port.- Parameters:
- port- connect point
- Returns:
- set of interfaces
 
 - 
getInterfacesByIpSet<Interface> getInterfacesByIp(IpAddress ip) Returns the set of interfaces with the given IP address.- Parameters:
- ip- IP address
- Returns:
- set of interfaces
 
 - 
getInterfacesByVlanSet<Interface> getInterfacesByVlan(VlanId vlan) Returns the set of interfaces in the given VLAN.- Parameters:
- vlan- VLAN ID of the interfaces
- Returns:
- set of interfaces
 
 - 
getMatchingInterfaceInterface getMatchingInterface(IpAddress ip) Returns an interface that has an address that is in the same subnet as the given IP address.- Parameters:
- ip- IP address to find matching subnet interface for
- Returns:
- interface
 
 - 
getMatchingInterfacesSet<Interface> getMatchingInterfaces(IpAddress ip) Returns all interfaces that have an address that is in the same subnet as the given IP address.- Parameters:
- ip- IP address to find matching subnet interface for
- Returns:
- a set of interfaces
 
 - 
getUntaggedVlanIddefault VlanId getUntaggedVlanId(ConnectPoint connectPoint) Returns untagged VLAN configured on given connect point.Only returns the first match if there are multiple untagged VLAN configured on the connect point. - Parameters:
- connectPoint- connect point
- Returns:
- untagged VLAN or null if not configured
 
 - 
getTaggedVlanIddefault Set<VlanId> getTaggedVlanId(ConnectPoint connectPoint) Returns tagged VLAN configured on given connect point.Returns all matches if there are multiple tagged VLAN configured on the connect point. - Parameters:
- connectPoint- connect point
- Returns:
- tagged VLAN or empty set if not configured
 
 - 
getNativeVlanIddefault VlanId getNativeVlanId(ConnectPoint connectPoint) Returns native VLAN configured on given connect point.Only returns the first match if there are multiple native VLAN configured on the connect point. - Parameters:
- connectPoint- connect point
- Returns:
- native VLAN or null if not configured
 
 - 
isConfigureddefault boolean isConfigured(ConnectPoint connectPoint) Returns true if given connectPoint has an IP address or vlan configured on any of its interfaces.- Parameters:
- connectPoint- the port on a device
- Returns:
- true if connectpoint has a configured interface
 
 - 
inUsedefault boolean inUse(VlanId vlanId) Returns true if given vlanId is in use due to configuration on any of the interfaces in the system.- Parameters:
- vlanId- the vlan id being queried
- Returns:
- true if vlan is configured on any interface
 
 
- 
 
-