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, java.util.List<java.lang.String> monitorsrcports, java.util.List<java.lang.String> monitordstports, java.util.List<VlanId> monitorvlans, java.util.Optional<java.lang.String> mirrorport, java.util.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 java.util.Optional<java.lang.String>
mirrorPort()
Returns mirror port.java.util.Optional<VlanId>
mirrorVlan()
Returns mirror vlan.java.util.List<java.lang.String>
monitorDstPorts()
Returns dst ports to monitor.java.util.List<java.lang.String>
monitorSrcPorts()
Returns src ports to monitor.java.util.List<VlanId>
monitorVlans()
Returns vlans to monitor.MirroringName
name()
Returns mirroring name.java.lang.String
toString()
-
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, java.util.List<java.lang.String> monitorsrcports, java.util.List<java.lang.String> monitordstports, java.util.List<VlanId> monitorvlans, java.util.Optional<java.lang.String> mirrorport, java.util.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:
name
in interfaceMirroringDescription
- Returns:
- mirroring name
-
monitorSrcPorts
public java.util.List<java.lang.String> monitorSrcPorts()
Returns src ports to monitor. If it is empty, then no src port has to be monitored.- Specified by:
monitorSrcPorts
in interfaceMirroringDescription
- Returns:
- set of src ports to monitor
-
monitorDstPorts
public java.util.List<java.lang.String> monitorDstPorts()
Returns dst ports to monitor. If it is empty, then no dst port has to be monitored.- Specified by:
monitorDstPorts
in interfaceMirroringDescription
- Returns:
- set of dst ports to monitor
-
monitorVlans
public java.util.List<VlanId> monitorVlans()
Returns vlans to monitor. If it is empty, then no vlan has to be monitored.- Specified by:
monitorVlans
in interfaceMirroringDescription
- Returns:
- monitored vlan
-
mirrorPort
public java.util.Optional<java.lang.String> mirrorPort()
Returns mirror port. If it is not set, then no destination port for mirrored packets.- Specified by:
mirrorPort
in interfaceMirroringDescription
- Returns:
- mirror port
-
mirrorVlan
public java.util.Optional<VlanId> mirrorVlan()
Returns mirror vlan. If it is not set the no destination vlan for mirrored packets.- Specified by:
mirrorVlan
in interfaceMirroringDescription
- Returns:
- mirror vlan
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-