blob: 4c814f86c6a6001cda373e096d6ea82668a04a33 [file] [log] [blame]
alshabib1d2bc402015-07-31 17:04:11 -07001/*
2 * Copyright 2015 Open Networking Laboratory
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 */
16package org.onosproject.incubator.net.meter;
17
18/**
19 * Created by ash on 01/08/15.
20 */
21public interface MeterContext {
22
23 /**
24 * Invoked on successful installation of the meter.
25 *
26 * @param op a meter operation
27 */
28 default void onSuccess(MeterOperation op) {
29 }
30
31 /**
32 * Invoked when error is encountered while installing a meter.
33 *
34 * @param op a meter operation
35 * @param reason the reason why it failed
36 */
37 default void onError(MeterOperation op, MeterFailReason reason) {
38 }
39}