blob: 2b1dd08f4f74ecbbe820db571d7815abd75e2330 [file] [log] [blame]
Simon Hunt441c9ae2017-02-03 18:22:31 -08001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2017-present Open Networking Foundation
Simon Hunt441c9ae2017-02-03 18:22:31 -08003 *
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.onosproject.ui.topo;
18
19/**
20 * Base class for the business logic of topology overlay "monitors".
21 */
22public class AbstractTopoMonitor {
23
Thomas Vachuskaa5e986d2021-04-06 11:14:09 -070024 /**
25 * Creates a new topo monitor base.
26 */
27 protected AbstractTopoMonitor() {
28 }
29
30 /**
31 * Number of milliseconds between invocations of sending traffic data.
32 */
33 protected static long trafficPeriod = 5000;
34
35 /**
36 * Sets the traffic refresh period in milliseconds.
37 *
38 * @param ms refresh rate in millis
39 */
40 public static void setTrafficPeriod(long ms) {
41 trafficPeriod = ms;
42 }
43
44 /**
45 * Returns the traffic refresh period in milliseconds.
46 *
47 * @return refresh rate in millis
48 */
49 public static long getTrafficPeriod() {
50 return trafficPeriod;
51 }
52
Simon Hunt441c9ae2017-02-03 18:22:31 -080053 // TODO: pull common code up into this class
54
55 // Note to Andrea:
56 // this class has to be defined in the core.api module, because
57 // external applications may want to extend it.
58}