Package org.onosproject.net.packet
Class DefaultPacketRequest
- java.lang.Object
-
- org.onosproject.net.packet.DefaultPacketRequest
-
- All Implemented Interfaces:
PacketRequest
public final class DefaultPacketRequest extends Object implements PacketRequest
Default implementation of a packet request.
-
-
Constructor Summary
Constructors Constructor Description DefaultPacketRequest(TrafficSelector selector, PacketPriority priority, ApplicationId appId, NodeId nodeId, 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.Optional<DeviceId>
deviceId()
Obtains the optional device id.boolean
equals(Object obj)
int
hashCode()
NodeId
nodeId()
Obtains the node id.PacketPriority
priority()
Obtains the priority.TrafficSelector
selector()
Obtains the traffic selector.String
toString()
-
-
-
Constructor Detail
-
DefaultPacketRequest
public DefaultPacketRequest(TrafficSelector selector, PacketPriority priority, ApplicationId appId, NodeId nodeId, 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 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
-
-