Package org.onosproject.net
Class PipelineTraceableHitChain
- java.lang.Object
-
- org.onosproject.net.PipelineTraceableHitChain
-
public final class PipelineTraceableHitChain extends java.lang.Object
Class to represent the pipeline hit chain and the result of the pipeline processing.
-
-
Constructor Summary
Constructors Constructor Description PipelineTraceableHitChain(ConnectPoint output, java.util.List<DataPlaneEntity> hits, PipelineTraceablePacket packet)
Creates a new PipelineTraceableHitChain.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDataPlaneEntity(DataPlaneEntity dataPlaneEntity)
Adds the provided dataplane entity to the end of the chain.void
dropped()
Set the dropped flag.PipelineTraceablePacket
egressPacket()
Returns the egress packet after traversing the pipeline.static PipelineTraceableHitChain
emptyHitChain()
Creates an empty pipeline hit chain.boolean
equals(java.lang.Object obj)
int
hashCode()
java.util.List<DataPlaneEntity>
hitChain()
Returns the hit chain.boolean
isDropped()
Return whether or not the packet has been dropped by the pipeline.ConnectPoint
outputPort()
Returns the output connect point.void
pass()
Unset the dropped flag.void
removeDataPlaneEntity(DataPlaneEntity dataPlaneEntity)
Removes the provided dataplane entity from the chain.void
setEgressPacket(PipelineTraceablePacket egressPacket)
Sets the egress packet.void
setOutputPort(ConnectPoint outputPort)
Sets the output port.java.lang.String
toString()
-
-
-
Constructor Detail
-
PipelineTraceableHitChain
public PipelineTraceableHitChain(ConnectPoint output, java.util.List<DataPlaneEntity> hits, PipelineTraceablePacket packet)
Creates a new PipelineTraceableHitChain.- Parameters:
output
- the output connect pointhits
- the hits in the pipeline (flows, groups and other abstractions)packet
- the traceable packet representing the final packet
-
-
Method Detail
-
emptyHitChain
public static PipelineTraceableHitChain emptyHitChain()
Creates an empty pipeline hit chain.- Returns:
- an empty pipeline hit chain
-
outputPort
public ConnectPoint outputPort()
Returns the output connect point.- Returns:
- the connect point
-
setOutputPort
public void setOutputPort(ConnectPoint outputPort)
Sets the output port.- Parameters:
outputPort
- the output port
-
hitChain
public java.util.List<DataPlaneEntity> hitChain()
Returns the hit chain.- Returns:
- flows and groups that matched.
-
addDataPlaneEntity
public void addDataPlaneEntity(DataPlaneEntity dataPlaneEntity)
Adds the provided dataplane entity to the end of the chain.- Parameters:
dataPlaneEntity
- the dataplane entity
-
removeDataPlaneEntity
public void removeDataPlaneEntity(DataPlaneEntity dataPlaneEntity)
Removes the provided dataplane entity from the chain.- Parameters:
dataPlaneEntity
- the dataplane entity
-
egressPacket
public PipelineTraceablePacket egressPacket()
Returns the egress packet after traversing the pipeline.- Returns:
- the traceable packet representing the packet infos
-
setEgressPacket
public void setEgressPacket(PipelineTraceablePacket egressPacket)
Sets the egress packet.- Parameters:
egressPacket
- the egress packet
-
isDropped
public boolean isDropped()
Return whether or not the packet has been dropped by the pipeline.- Returns:
- true if the packet has been dropped. False, otherwise.
-
dropped
public void dropped()
Set the dropped flag.
-
pass
public void pass()
Unset the dropped flag.
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-