Package org.onosproject.net.behaviour
Class DefaultMirroringDescription
- java.lang.Object
-
- org.onosproject.net.AbstractDescription
-
- org.onosproject.net.behaviour.DefaultMirroringDescription
-
- All Implemented Interfaces:
Annotated,MirroringDescription,Description
@Beta public final class DefaultMirroringDescription extends AbstractDescription implements MirroringDescription
Default implementation of mirroring description entity.
-
-
Constructor Summary
Constructors Constructor Description DefaultMirroringDescription(MirroringName name, List<String> monitorsrcports, List<String> monitordstports, List<VlanId> monitorvlans, Optional<String> mirrorport, Optional<VlanId> mirrorvlan, SparseAnnotations... annotations)Creates a mirroring description using the supplied information.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>mirrorPort()Returns mirror port.Optional<VlanId>mirrorVlan()Returns mirror vlan.List<String>monitorDstPorts()Returns dst ports to monitor.List<String>monitorSrcPorts()Returns src ports to monitor.List<VlanId>monitorVlans()Returns vlans to monitor.MirroringNamename()Returns mirroring name.StringtoString()-
Methods inherited from class org.onosproject.net.AbstractDescription
annotations, equals, hashCode
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.onosproject.net.Description
annotations
-
-
-
-
Constructor Detail
-
DefaultMirroringDescription
public DefaultMirroringDescription(MirroringName name, List<String> monitorsrcports, List<String> monitordstports, List<VlanId> monitorvlans, Optional<String> mirrorport, Optional<VlanId> mirrorvlan, SparseAnnotations... annotations)
Creates a mirroring description using the supplied information.- Parameters:
name- the name of the mirroringmonitorsrcports- the monitored src portsmonitordstports- the monitored dst portsmonitorvlans- the monitored vlansmirrorport- the mirror portmirrorvlan- the mirror vlanannotations- optional key/value annotations
-
-
Method Detail
-
name
public MirroringName name()
Returns mirroring name.- Specified by:
namein interfaceMirroringDescription- Returns:
- mirroring name
-
monitorSrcPorts
public List<String> monitorSrcPorts()
Returns src ports to monitor. If it is empty, then no src port has to be monitored.- Specified by:
monitorSrcPortsin interfaceMirroringDescription- Returns:
- set of src ports to monitor
-
monitorDstPorts
public List<String> monitorDstPorts()
Returns dst ports to monitor. If it is empty, then no dst port has to be monitored.- Specified by:
monitorDstPortsin interfaceMirroringDescription- Returns:
- set of dst ports to monitor
-
monitorVlans
public List<VlanId> monitorVlans()
Returns vlans to monitor. If it is empty, then no vlan has to be monitored.- Specified by:
monitorVlansin interfaceMirroringDescription- Returns:
- monitored vlan
-
mirrorPort
public Optional<String> mirrorPort()
Returns mirror port. If it is not set, then no destination port for mirrored packets.- Specified by:
mirrorPortin interfaceMirroringDescription- Returns:
- mirror port
-
mirrorVlan
public Optional<VlanId> mirrorVlan()
Returns mirror vlan. If it is not set the no destination vlan for mirrored packets.- Specified by:
mirrorVlanin interfaceMirroringDescription- Returns:
- mirror vlan
-
-