blob: 01116d8eb3023c19a19655d0edcb74bcf0ef1a9e [file] [log] [blame]
alshabib42947782015-03-31 14:59:06 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
alshabib42947782015-03-31 14:59:06 -07003 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.net.packet;
17
Madan Jampani6f8b7022015-12-07 16:59:59 -080018import org.onosproject.cluster.NodeId;
alshabib42947782015-03-31 14:59:06 -070019import org.onosproject.core.ApplicationId;
alshabib19e2cea2015-12-07 11:31:49 -080020import org.onosproject.net.DeviceId;
alshabib42947782015-03-31 14:59:06 -070021import org.onosproject.net.flow.TrafficSelector;
22
alshabib19e2cea2015-12-07 11:31:49 -080023import java.util.Optional;
24
alshabib42947782015-03-31 14:59:06 -070025/**
26 * Represents a packet request made to devices.
27 */
28public interface PacketRequest {
29
30 /**
31 * Obtain the traffic selector.
Thomas Vachuska27bee092015-06-23 19:03:10 -070032 *
alshabib42947782015-03-31 14:59:06 -070033 * @return a traffic selector
34 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070035 TrafficSelector selector();
alshabib42947782015-03-31 14:59:06 -070036
37 /**
38 * Obtain the priority.
Thomas Vachuska27bee092015-06-23 19:03:10 -070039 *
alshabib42947782015-03-31 14:59:06 -070040 * @return a PacketPriority
41 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070042 PacketPriority priority();
alshabib42947782015-03-31 14:59:06 -070043
44 /**
45 * Obtain the application id.
Thomas Vachuska27bee092015-06-23 19:03:10 -070046 *
alshabib42947782015-03-31 14:59:06 -070047 * @return an application id
48 */
Sho SHIMIZU3310a342015-05-13 12:14:05 -070049 ApplicationId appId();
alshabib42947782015-03-31 14:59:06 -070050
Madan Jampani6f8b7022015-12-07 16:59:59 -080051 /**
52 * Obtain the node id.
53 *
54 * @return an node id
55 */
56 NodeId nodeId();
alshabib19e2cea2015-12-07 11:31:49 -080057
58 /**
59 * Obtains the optional device id.
60 *
61 * @return an optional containing a device id
62 */
63 Optional<DeviceId> deviceId();
64
alshabib42947782015-03-31 14:59:06 -070065}