kartikey dubey | e154542 | 2019-05-22 12:53:45 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2018-present Open Networking Foundation |
| 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 | |
| 17 | package org.opencord.aaa; |
| 18 | |
| 19 | import org.onosproject.event.ListenerService; |
| 20 | |
| 21 | /** |
Jonathan Hart | c41227c | 2020-01-28 16:56:49 -0800 | [diff] [blame] | 22 | * Service for interacting with accounting statistics. |
kartikey dubey | e154542 | 2019-05-22 12:53:45 +0000 | [diff] [blame] | 23 | */ |
kartikey dubey | e154542 | 2019-05-22 12:53:45 +0000 | [diff] [blame] | 24 | public interface AuthenticationStatisticsService extends |
Jonathan Hart | c41227c | 2020-01-28 16:56:49 -0800 | [diff] [blame] | 25 | ListenerService<AuthenticationStatisticsEvent, AuthenticationStatisticsEventListener> { |
kartikey dubey | e154542 | 2019-05-22 12:53:45 +0000 | [diff] [blame] | 26 | |
| 27 | /** |
Jonathan Hart | c41227c | 2020-01-28 16:56:49 -0800 | [diff] [blame] | 28 | * Returns AaaStatistics object containing only local (this instance) statistics. |
kartikey dubey | e154542 | 2019-05-22 12:53:45 +0000 | [diff] [blame] | 29 | * |
| 30 | * @return AaaStatistics |
Vijaykumar Kushwaha | a54ce55 | 2019-06-18 09:37:42 +0000 | [diff] [blame] | 31 | */ |
Jonathan Hart | c41227c | 2020-01-28 16:56:49 -0800 | [diff] [blame] | 32 | AaaStatistics getAaaStats(); |
| 33 | |
kartikey dubey | e154542 | 2019-05-22 12:53:45 +0000 | [diff] [blame] | 34 | /** |
Jonathan Hart | c41227c | 2020-01-28 16:56:49 -0800 | [diff] [blame] | 35 | * Gets the cluster-wide statistics. |
kartikey dubey | e154542 | 2019-05-22 12:53:45 +0000 | [diff] [blame] | 36 | * |
Jonathan Hart | c41227c | 2020-01-28 16:56:49 -0800 | [diff] [blame] | 37 | * @return snapshot containing cluster statistics |
Vijaykumar Kushwaha | a54ce55 | 2019-06-18 09:37:42 +0000 | [diff] [blame] | 38 | */ |
Jonathan Hart | c41227c | 2020-01-28 16:56:49 -0800 | [diff] [blame] | 39 | AaaStatisticsSnapshot getClusterStatistics(); |
kartikey dubey | e154542 | 2019-05-22 12:53:45 +0000 | [diff] [blame] | 40 | |
| 41 | /** |
| 42 | * Handle the roundTrip time of Radius Packet. |
| 43 | * |
| 44 | * @param identifier identifier of incoming radius packet |
Vijaykumar Kushwaha | a54ce55 | 2019-06-18 09:37:42 +0000 | [diff] [blame] | 45 | */ |
Jonathan Hart | c41227c | 2020-01-28 16:56:49 -0800 | [diff] [blame] | 46 | void handleRoundtripTime(byte identifier); |
kartikey dubey | e154542 | 2019-05-22 12:53:45 +0000 | [diff] [blame] | 47 | |
| 48 | /** |
| 49 | * Calculate average roundTrip time of multiple Packets. |
Vijaykumar Kushwaha | a54ce55 | 2019-06-18 09:37:42 +0000 | [diff] [blame] | 50 | */ |
Jonathan Hart | c41227c | 2020-01-28 16:56:49 -0800 | [diff] [blame] | 51 | void calculatePacketRoundtripTime(); |
kartikey dubey | e154542 | 2019-05-22 12:53:45 +0000 | [diff] [blame] | 52 | |
| 53 | /** |
| 54 | * Put the identifier value to map. |
| 55 | * |
| 56 | * @param identifier identifier of incoming radius packet |
Vijaykumar Kushwaha | a54ce55 | 2019-06-18 09:37:42 +0000 | [diff] [blame] | 57 | */ |
Jonathan Hart | c41227c | 2020-01-28 16:56:49 -0800 | [diff] [blame] | 58 | void putOutgoingIdentifierToMap(byte identifier); |
Vijaykumar Kushwaha | a54ce55 | 2019-06-18 09:37:42 +0000 | [diff] [blame] | 59 | |
Jonathan Hart | c41227c | 2020-01-28 16:56:49 -0800 | [diff] [blame] | 60 | /** |
| 61 | * Reset all the values of aaa counters to 0. |
| 62 | */ |
| 63 | void resetAllCounters(); |
kartikey dubey | e154542 | 2019-05-22 12:53:45 +0000 | [diff] [blame] | 64 | } |