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.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(java.lang.Object o)
int
hashCode()
java.util.Collection<PiPacketMetadata>
metadatas()
Returns all metadatas of this packet.java.lang.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 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:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
builder
public static PiPacketOperation.Builder builder()
Returns a new builder of packet operations.- Returns:
- a new builder
-
-