Package org.onosproject.net.pi.runtime
Class PiPacketOperation
- java.lang.Object
-
- org.onosproject.net.pi.runtime.PiPacketOperation
-
@Beta public final class PiPacketOperation extends java.lang.ObjectInstance of a packet I/O operation that includes the packet body (frame) and its metadata, for a protocol-independent pipeline.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPiPacketOperation.BuilderBuilder of packet operations.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PiPacketOperation.Builderbuilder()Returns a new builder of packet operations.ImmutableByteSequencedata()Returns the data of this packet.booleanequals(java.lang.Object o)inthashCode()java.util.Collection<PiPacketMetadata>metadatas()Returns all metadatas of this packet.java.lang.StringtoString()PiPacketOperationTypetype()Return the type of this packet.
-
-
-
Method Detail
-
type
public PiPacketOperationType type()
Return the type of this packet.- Returns:
- packet type
-
data
public ImmutableByteSequence data()
Returns the data of this packet.- Returns:
- packet data
-
metadatas
public java.util.Collection<PiPacketMetadata> metadatas()
Returns all metadatas of this packet. Returns an empty collection if the packet doesn't have any metadata.- Returns:
- collection of metadatas
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
builder
public static PiPacketOperation.Builder builder()
Returns a new builder of packet operations.- Returns:
- a new builder
-
-