Class DefaultOutboundPacket

  • All Implemented Interfaces:
    OutboundPacket

    public final class DefaultOutboundPacket
    extends java.lang.Object
    implements OutboundPacket
    Default implementation of an immutable outbound packet.
    • Constructor Detail

      • DefaultOutboundPacket

        public DefaultOutboundPacket​(DeviceId sendThrough,
                                     TrafficTreatment treatment,
                                     java.nio.ByteBuffer data)
        Creates an immutable outbound packet.
        Parameters:
        sendThrough - identifier through which to send the packet
        treatment - list of packet treatments
        data - raw packet data
      • DefaultOutboundPacket

        public DefaultOutboundPacket​(DeviceId sendThrough,
                                     TrafficTreatment treatment,
                                     java.nio.ByteBuffer data,
                                     PortNumber inPort)
        Creates an immutable outbound packet.
        Parameters:
        sendThrough - identifier through which to send the packet
        treatment - list of packet treatments
        data - raw packet data
        inPort - input port to be used for the packet
    • Method Detail

      • sendThrough

        public DeviceId sendThrough()
        Description copied from interface: OutboundPacket
        Returns the identity of a device through which this packet should be sent.
        Specified by:
        sendThrough in interface OutboundPacket
        Returns:
        device identity
      • data

        public java.nio.ByteBuffer data()
        Description copied from interface: OutboundPacket
        Returns immutable view of the raw data to be sent.
        Specified by:
        data in interface OutboundPacket
        Returns:
        data to emit
      • inPort

        public PortNumber inPort()
        Description copied from interface: OutboundPacket
        Returns the input port of this packet. Defaults to controller port. This is useful for actions that involve the input port such as ALL or FLOOD.
        Specified by:
        inPort in interface OutboundPacket
        Returns:
        the input port to be used for this packet.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object