Package org.onosproject.net.packet
Class DefaultPacketRequest
- java.lang.Object
-
- org.onosproject.net.packet.DefaultPacketRequest
-
- All Implemented Interfaces:
PacketRequest
public final class DefaultPacketRequest extends java.lang.Object implements PacketRequest
Default implementation of a packet request.
-
-
Constructor Summary
Constructors Constructor Description DefaultPacketRequest(TrafficSelector selector, PacketPriority priority, ApplicationId appId, NodeId nodeId, java.util.Optional<DeviceId> deviceId)
Creates a new packet request.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ApplicationId
appId()
Obtains the application id.java.util.Optional<DeviceId>
deviceId()
Obtains the optional device id.boolean
equals(java.lang.Object obj)
int
hashCode()
NodeId
nodeId()
Obtains the node id.PacketPriority
priority()
Obtains the priority.TrafficSelector
selector()
Obtains the traffic selector.java.lang.String
toString()
-
-
-
Constructor Detail
-
DefaultPacketRequest
public DefaultPacketRequest(TrafficSelector selector, PacketPriority priority, ApplicationId appId, NodeId nodeId, java.util.Optional<DeviceId> deviceId)
Creates a new packet request.- Parameters:
selector
- traffic selectorpriority
- intercept priorityappId
- application idnodeId
- identifier of node where request originateddeviceId
- device id
-
-
Method Detail
-
selector
public TrafficSelector selector()
Description copied from interface:PacketRequest
Obtains the traffic selector.- Specified by:
selector
in interfacePacketRequest
- Returns:
- a traffic selector
-
priority
public PacketPriority priority()
Description copied from interface:PacketRequest
Obtains the priority.- Specified by:
priority
in interfacePacketRequest
- Returns:
- a PacketPriority
-
appId
public ApplicationId appId()
Description copied from interface:PacketRequest
Obtains the application id.- Specified by:
appId
in interfacePacketRequest
- Returns:
- an application id
-
deviceId
public java.util.Optional<DeviceId> deviceId()
Description copied from interface:PacketRequest
Obtains the optional device id.- Specified by:
deviceId
in interfacePacketRequest
- Returns:
- an optional containing a device id
-
nodeId
public NodeId nodeId()
Description copied from interface:PacketRequest
Obtains the node id.- Specified by:
nodeId
in interfacePacketRequest
- Returns:
- an node id
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-