Brian O'Connor | b7baf71 | 2015-07-28 23:27:03 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Open Networking Laboratory |
| 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.incubator.net.domain; |
| 17 | |
| 18 | import com.google.common.annotations.Beta; |
| 19 | |
| 20 | /** |
| 21 | * The abstract base class for the resource that satisfies an intent primitive. |
| 22 | */ |
| 23 | @Beta |
Brian O'Connor | 59a9285 | 2015-07-30 19:08:24 -0700 | [diff] [blame^] | 24 | public class IntentResource { |
Brian O'Connor | b7baf71 | 2015-07-28 23:27:03 -0700 | [diff] [blame] | 25 | |
| 26 | private final IntentPrimitive primitive; |
Brian O'Connor | 59a9285 | 2015-07-30 19:08:24 -0700 | [diff] [blame^] | 27 | private final long tunnelId; |
Brian O'Connor | b7baf71 | 2015-07-28 23:27:03 -0700 | [diff] [blame] | 28 | |
| 29 | // TODO add other common fields |
| 30 | //String ingressTag; |
| 31 | //String egressTag; |
| 32 | //etc. |
| 33 | |
Brian O'Connor | 59a9285 | 2015-07-30 19:08:24 -0700 | [diff] [blame^] | 34 | public IntentResource(IntentPrimitive primitive, long tunnelId) { |
Brian O'Connor | b7baf71 | 2015-07-28 23:27:03 -0700 | [diff] [blame] | 35 | this.primitive = primitive; |
Brian O'Connor | 59a9285 | 2015-07-30 19:08:24 -0700 | [diff] [blame^] | 36 | this.tunnelId = tunnelId; |
Brian O'Connor | b7baf71 | 2015-07-28 23:27:03 -0700 | [diff] [blame] | 37 | } |
| 38 | |
| 39 | public IntentPrimitive primitive() { |
| 40 | return primitive; |
| 41 | } |
| 42 | |
Brian O'Connor | 59a9285 | 2015-07-30 19:08:24 -0700 | [diff] [blame^] | 43 | public long tunnelId() { |
| 44 | return tunnelId; |
| 45 | } |
| 46 | |
Brian O'Connor | b7baf71 | 2015-07-28 23:27:03 -0700 | [diff] [blame] | 47 | } |