Package org.onosproject.net.pi.runtime
Class PiPacketOperation
- java.lang.Object
-
- org.onosproject.net.pi.runtime.PiPacketOperation
-
@Beta public final class PiPacketOperation extends Object
Instance 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 class
PiPacketOperation.Builder
Builder of packet operations.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PiPacketOperation.Builder
builder()
Returns a new builder of packet operations.ImmutableByteSequence
data()
Returns the data of this packet.boolean
equals(Object o)
int
hashCode()
Collection<PiPacketMetadata>
metadatas()
Returns all metadatas of this packet.String
toString()
PiPacketOperationType
type()
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 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
-
builder
public static PiPacketOperation.Builder builder()
Returns a new builder of packet operations.- Returns:
- a new builder
-
-