Pengfei Lu | e0c02e2 | 2015-07-07 15:41:31 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2015 Open Networking Laboratory |
| 3 | * Originally created by Pengfei Lu, Network and Cloud Computing Laboratory, Dalian University of Technology, China |
Pengfei Lu | e53419b | 2015-08-29 10:11:02 +0800 | [diff] [blame^] | 4 | * Advisers: Keqiu Li, Heng Qi and Haisheng Yu |
Pengfei Lu | e0c02e2 | 2015-07-07 15:41:31 +0800 | [diff] [blame] | 5 | * This work is supported by the State Key Program of National Natural Science of China(Grant No. 61432002) |
| 6 | * and Prospective Research Project on Future Networks in Jiangsu Future Networks Innovation Institute. |
| 7 | * |
| 8 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 9 | * you may not use this file except in compliance with the License. |
| 10 | * You may obtain a copy of the License at |
| 11 | * |
| 12 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | * |
| 14 | * Unless required by applicable law or agreed to in writing, software |
| 15 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 17 | * See the License for the specific language governing permissions and |
| 18 | * limitations under the License. |
| 19 | */ |
| 20 | package org.onos.acl; |
| 21 | |
| 22 | import java.util.List; |
| 23 | |
| 24 | /** |
| 25 | * Service interface exported by ACL application. |
| 26 | */ |
| 27 | public interface AclService { |
| 28 | |
| 29 | /** |
| 30 | * Gets a list containing all ACL rules. |
| 31 | * @return a list containing all ACL rules |
| 32 | */ |
| 33 | List<AclRule> getAclRules(); |
| 34 | |
| 35 | /** |
| 36 | * Adds a new ACL rule. |
| 37 | * @param rule ACL rule |
| 38 | * @return true if successfully added, otherwise false |
| 39 | */ |
| 40 | boolean addAclRule(AclRule rule); |
| 41 | |
| 42 | /** |
| 43 | * Removes an exsiting ACL rule by rule id. |
| 44 | * @param ruleId ACL rule identifier |
| 45 | */ |
| 46 | void removeAclRule(RuleId ruleId); |
| 47 | |
| 48 | /** |
| 49 | * Clears ACL and resets all. |
| 50 | */ |
| 51 | void clearAcl(); |
| 52 | |
| 53 | } |