blob: e3bc347179312fc42575b06d1644aa778b815542 [file] [log] [blame]
alshabib1d2bc402015-07-31 17:04:11 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
alshabib1d2bc402015-07-31 17:04:11 -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;
alshabib1d2bc402015-07-31 17:04:11 -070017
18/**
alshabibeadfc8e2015-08-18 15:40:46 -070019 * A context permitting the application to be notified when the
20 * meter installation has been successful.
alshabib1d2bc402015-07-31 17:04:11 -070021 */
22public interface MeterContext {
23
24 /**
25 * Invoked on successful installation of the meter.
26 *
alshabibeadfc8e2015-08-18 15:40:46 -070027 * @param op a meter
alshabib1d2bc402015-07-31 17:04:11 -070028 */
alshabibe1248b62015-08-20 17:21:55 -070029 default void onSuccess(MeterRequest op) {}
alshabib1d2bc402015-07-31 17:04:11 -070030
31 /**
32 * Invoked when error is encountered while installing a meter.
33 *
alshabibeadfc8e2015-08-18 15:40:46 -070034 * @param op a meter
alshabib1d2bc402015-07-31 17:04:11 -070035 * @param reason the reason why it failed
36 */
alshabibe1248b62015-08-20 17:21:55 -070037 default void onError(MeterRequest op, MeterFailReason reason) {}
alshabib1d2bc402015-07-31 17:04:11 -070038}