blob: 9f5a5bf3584b323138fac26e4910fc1e995891c5 [file] [log] [blame]
alshabibbc371962015-07-09 22:26:21 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
alshabibbc371962015-07-09 22:26:21 -07003 *
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 */
alshabib10c810b2015-08-18 16:59:04 -070016package org.onosproject.net.meter;
alshabibbc371962015-07-09 22:26:21 -070017
18import org.onosproject.net.DeviceId;
19import org.onosproject.net.provider.ProviderService;
20
21import java.util.Collection;
22
23/**
24 * Service through which meter providers can inject information
25 * into the core.
26 */
27public interface MeterProviderService extends ProviderService<MeterProvider> {
28
29 /**
30 * Notifies the core that a meter operaton failed for a
31 * specific reason.
alshabibc7911792015-07-30 17:55:30 -070032 * @param operation the failed operation
33 * @param reason the failure reason
alshabibbc371962015-07-09 22:26:21 -070034 */
alshabibc7911792015-07-30 17:55:30 -070035 void meterOperationFailed(MeterOperation operation,
alshabibbc371962015-07-09 22:26:21 -070036 MeterFailReason reason);
37
38 /**
39 * Pushes the collection of meters observed on the data plane as
40 * well as their associated statistics.
41 *
42 * @param deviceId a device id
43 * @param meterEntries a collection of meter entries
44 */
45 void pushMeterMetrics(DeviceId deviceId,
46 Collection<Meter> meterEntries);
47
48
49}