alshabib | 4294778 | 2015-03-31 14:59:06 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Foundation |
alshabib | 4294778 | 2015-03-31 14:59:06 -0700 | [diff] [blame] | 3 | * |
| 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 | */ |
| 16 | package org.onosproject.net.packet; |
| 17 | |
Madan Jampani | 6f8b702 | 2015-12-07 16:59:59 -0800 | [diff] [blame] | 18 | import org.onosproject.cluster.NodeId; |
alshabib | 4294778 | 2015-03-31 14:59:06 -0700 | [diff] [blame] | 19 | import org.onosproject.core.ApplicationId; |
alshabib | 19e2cea | 2015-12-07 11:31:49 -0800 | [diff] [blame] | 20 | import org.onosproject.net.DeviceId; |
alshabib | 4294778 | 2015-03-31 14:59:06 -0700 | [diff] [blame] | 21 | import org.onosproject.net.flow.TrafficSelector; |
| 22 | |
alshabib | 19e2cea | 2015-12-07 11:31:49 -0800 | [diff] [blame] | 23 | import java.util.Optional; |
| 24 | |
alshabib | 4294778 | 2015-03-31 14:59:06 -0700 | [diff] [blame] | 25 | /** |
| 26 | * Represents a packet request made to devices. |
| 27 | */ |
| 28 | public interface PacketRequest { |
| 29 | |
| 30 | /** |
Charles Chan | 874900e | 2016-12-09 16:55:39 -0800 | [diff] [blame] | 31 | * Obtains the traffic selector. |
Thomas Vachuska | 27bee09 | 2015-06-23 19:03:10 -0700 | [diff] [blame] | 32 | * |
alshabib | 4294778 | 2015-03-31 14:59:06 -0700 | [diff] [blame] | 33 | * @return a traffic selector |
| 34 | */ |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 35 | TrafficSelector selector(); |
alshabib | 4294778 | 2015-03-31 14:59:06 -0700 | [diff] [blame] | 36 | |
| 37 | /** |
Charles Chan | 874900e | 2016-12-09 16:55:39 -0800 | [diff] [blame] | 38 | * Obtains the priority. |
Thomas Vachuska | 27bee09 | 2015-06-23 19:03:10 -0700 | [diff] [blame] | 39 | * |
alshabib | 4294778 | 2015-03-31 14:59:06 -0700 | [diff] [blame] | 40 | * @return a PacketPriority |
| 41 | */ |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 42 | PacketPriority priority(); |
alshabib | 4294778 | 2015-03-31 14:59:06 -0700 | [diff] [blame] | 43 | |
| 44 | /** |
Charles Chan | 874900e | 2016-12-09 16:55:39 -0800 | [diff] [blame] | 45 | * Obtains the application id. |
Thomas Vachuska | 27bee09 | 2015-06-23 19:03:10 -0700 | [diff] [blame] | 46 | * |
alshabib | 4294778 | 2015-03-31 14:59:06 -0700 | [diff] [blame] | 47 | * @return an application id |
| 48 | */ |
Sho SHIMIZU | 3310a34 | 2015-05-13 12:14:05 -0700 | [diff] [blame] | 49 | ApplicationId appId(); |
alshabib | 4294778 | 2015-03-31 14:59:06 -0700 | [diff] [blame] | 50 | |
Madan Jampani | 6f8b702 | 2015-12-07 16:59:59 -0800 | [diff] [blame] | 51 | /** |
Charles Chan | 874900e | 2016-12-09 16:55:39 -0800 | [diff] [blame] | 52 | * Obtains the node id. |
Madan Jampani | 6f8b702 | 2015-12-07 16:59:59 -0800 | [diff] [blame] | 53 | * |
| 54 | * @return an node id |
| 55 | */ |
| 56 | NodeId nodeId(); |
alshabib | 19e2cea | 2015-12-07 11:31:49 -0800 | [diff] [blame] | 57 | |
| 58 | /** |
| 59 | * Obtains the optional device id. |
| 60 | * |
| 61 | * @return an optional containing a device id |
| 62 | */ |
| 63 | Optional<DeviceId> deviceId(); |
| 64 | |
alshabib | 4294778 | 2015-03-31 14:59:06 -0700 | [diff] [blame] | 65 | } |