blob: 9f0938723d5c8bb2f4a8bb21f8f800034bb92d89 [file] [log] [blame]
kartikey dubeye1545422019-05-22 12:53:45 +00001/*
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
17package org.opencord.aaa;
18
19import org.onosproject.event.ListenerService;
20
21/**
Jonathan Hartc41227c2020-01-28 16:56:49 -080022 * Service for interacting with accounting statistics.
kartikey dubeye1545422019-05-22 12:53:45 +000023 */
kartikey dubeye1545422019-05-22 12:53:45 +000024public interface AuthenticationStatisticsService extends
Jonathan Hartc41227c2020-01-28 16:56:49 -080025 ListenerService<AuthenticationStatisticsEvent, AuthenticationStatisticsEventListener> {
kartikey dubeye1545422019-05-22 12:53:45 +000026
27 /**
Jonathan Hartc41227c2020-01-28 16:56:49 -080028 * Returns AaaStatistics object containing only local (this instance) statistics.
kartikey dubeye1545422019-05-22 12:53:45 +000029 *
30 * @return AaaStatistics
Vijaykumar Kushwahaa54ce552019-06-18 09:37:42 +000031 */
Jonathan Hartc41227c2020-01-28 16:56:49 -080032 AaaStatistics getAaaStats();
33
kartikey dubeye1545422019-05-22 12:53:45 +000034 /**
Jonathan Hartc41227c2020-01-28 16:56:49 -080035 * Gets the cluster-wide statistics.
kartikey dubeye1545422019-05-22 12:53:45 +000036 *
Jonathan Hartc41227c2020-01-28 16:56:49 -080037 * @return snapshot containing cluster statistics
Vijaykumar Kushwahaa54ce552019-06-18 09:37:42 +000038 */
Jonathan Hartc41227c2020-01-28 16:56:49 -080039 AaaStatisticsSnapshot getClusterStatistics();
kartikey dubeye1545422019-05-22 12:53:45 +000040
41 /**
42 * Handle the roundTrip time of Radius Packet.
43 *
44 * @param identifier identifier of incoming radius packet
Vijaykumar Kushwahaa54ce552019-06-18 09:37:42 +000045 */
Jonathan Hartc41227c2020-01-28 16:56:49 -080046 void handleRoundtripTime(byte identifier);
kartikey dubeye1545422019-05-22 12:53:45 +000047
48 /**
49 * Calculate average roundTrip time of multiple Packets.
Vijaykumar Kushwahaa54ce552019-06-18 09:37:42 +000050 */
Jonathan Hartc41227c2020-01-28 16:56:49 -080051 void calculatePacketRoundtripTime();
kartikey dubeye1545422019-05-22 12:53:45 +000052
53 /**
54 * Put the identifier value to map.
55 *
56 * @param identifier identifier of incoming radius packet
Vijaykumar Kushwahaa54ce552019-06-18 09:37:42 +000057 */
Jonathan Hartc41227c2020-01-28 16:56:49 -080058 void putOutgoingIdentifierToMap(byte identifier);
Vijaykumar Kushwahaa54ce552019-06-18 09:37:42 +000059
Jonathan Hartc41227c2020-01-28 16:56:49 -080060 /**
61 * Reset all the values of aaa counters to 0.
62 */
63 void resetAllCounters();
kartikey dubeye1545422019-05-22 12:53:45 +000064}