Class PiPacketOperation.Builder

  • Enclosing class:
    PiPacketOperation

    public static final class PiPacketOperation.Builder
    extends Object
    Builder of packet operations.
    • Method Detail

      • withData

        public PiPacketOperation.Builder withData​(org.onlab.util.ImmutableByteSequence data)
        Sets the raw packet data.
        Parameters:
        data - the packet raw data
        Returns:
        this
      • withMetadata

        public PiPacketOperation.Builder withMetadata​(PiPacketMetadata metadata)
        Adds a packet metadata. Only one metadata is allowed for a given metadata id. If a metadata with same id already exists it will be replaced by the given one.
        Parameters:
        metadata - packet metadata
        Returns:
        this
      • build

        public PiPacketOperation build()
        Builds a new instance of a packet operation.
        Returns:
        packet operation