blob: cb91e0d50f5de5066d2691e67f24e0682f9c33bf [file] [log] [blame]
Simon Hunt1911fe42017-05-02 18:25:58 -07001/*
2 * Copyright 2017-present 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 *
16 */
17
18package org.onosproject.ui.impl.topo;
19
20import org.onosproject.ui.impl.TrafficMonitorBase;
21import org.onosproject.ui.impl.topo.util.ServicesBundle;
22import org.slf4j.Logger;
23import org.slf4j.LoggerFactory;
24
25/**
26 * Encapsulates the behavior of monitoring specific traffic patterns in the
27 * Topology-2 view.
28 */
29public class Traffic2Monitor extends TrafficMonitorBase {
30
31 private static final Logger log =
32 LoggerFactory.getLogger(Traffic2Monitor.class);
33
Simon Hunt9e2413e2017-05-03 14:25:40 -070034 private final Topo2TrafficMessageHandler msgHandler;
35
Simon Hunt1911fe42017-05-02 18:25:58 -070036 /**
37 * Constructs a traffic monitor.
38 *
Simon Hunt9e2413e2017-05-03 14:25:40 -070039 * @param trafficPeriod traffic task period in ms
Simon Hunt1911fe42017-05-02 18:25:58 -070040 * @param servicesBundle bundle of services
Simon Hunt9e2413e2017-05-03 14:25:40 -070041 * @param msgHandler our message handler
Simon Hunt1911fe42017-05-02 18:25:58 -070042 */
Simon Hunt9e2413e2017-05-03 14:25:40 -070043 public Traffic2Monitor(long trafficPeriod, ServicesBundle servicesBundle,
44 Topo2TrafficMessageHandler msgHandler) {
Simon Hunt1911fe42017-05-02 18:25:58 -070045 super(trafficPeriod, servicesBundle);
Simon Hunt9e2413e2017-05-03 14:25:40 -070046 this.msgHandler = msgHandler;
Simon Hunt1911fe42017-05-02 18:25:58 -070047 }
48
49 @Override
50 protected void sendAllFlowTraffic() {
Simon Hunt9e2413e2017-05-03 14:25:40 -070051 log.debug("TOPO-2-TRAFFIC: sendAllFlowTraffic");
Simon Hunt1911fe42017-05-02 18:25:58 -070052 // TODO
53 }
54
55 @Override
56 protected void sendAllPortTrafficBits() {
Simon Hunt9e2413e2017-05-03 14:25:40 -070057 log.debug("TOPO-2-TRAFFIC: sendAllPortTrafficBits");
Simon Hunt1911fe42017-05-02 18:25:58 -070058 // TODO
59 }
60
61 @Override
62 protected void sendAllPortTrafficPackets() {
Simon Hunt9e2413e2017-05-03 14:25:40 -070063 log.debug("TOPO-2-TRAFFIC: sendAllPortTrafficPackets");
Simon Hunt1911fe42017-05-02 18:25:58 -070064 // TODO
65 }
66
67 @Override
Simon Hunt1911fe42017-05-02 18:25:58 -070068 protected void sendClearHighlights() {
Simon Hunt9e2413e2017-05-03 14:25:40 -070069 log.debug("TOPO-2-TRAFFIC: sendClearHighlights");
Simon Hunt1911fe42017-05-02 18:25:58 -070070 // TODO
71 }
72
Simon Hunt9e2413e2017-05-03 14:25:40 -070073
74 // NOTE: currently this monitor holds no state - nothing to do for these...
75 @Override
76 protected void sendDeviceLinkFlows() {
77 }
78
79 @Override
80 protected void sendSelectedIntentTraffic() {
81 }
82
Simon Hunt1911fe42017-05-02 18:25:58 -070083 @Override
84 protected void clearSelection() {
Simon Hunt1911fe42017-05-02 18:25:58 -070085 }
86}