Simon Hunt | 1911fe4 | 2017-05-02 18:25:58 -0700 | [diff] [blame] | 1 | /* |
| 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 | |
| 18 | package org.onosproject.ui.impl.topo; |
| 19 | |
| 20 | import org.onosproject.ui.impl.TrafficMonitorBase; |
| 21 | import org.onosproject.ui.impl.topo.util.ServicesBundle; |
| 22 | import org.slf4j.Logger; |
| 23 | import org.slf4j.LoggerFactory; |
| 24 | |
| 25 | /** |
| 26 | * Encapsulates the behavior of monitoring specific traffic patterns in the |
| 27 | * Topology-2 view. |
| 28 | */ |
| 29 | public class Traffic2Monitor extends TrafficMonitorBase { |
| 30 | |
| 31 | private static final Logger log = |
| 32 | LoggerFactory.getLogger(Traffic2Monitor.class); |
| 33 | |
Simon Hunt | 9e2413e | 2017-05-03 14:25:40 -0700 | [diff] [blame^] | 34 | private final Topo2TrafficMessageHandler msgHandler; |
| 35 | |
Simon Hunt | 1911fe4 | 2017-05-02 18:25:58 -0700 | [diff] [blame] | 36 | /** |
| 37 | * Constructs a traffic monitor. |
| 38 | * |
Simon Hunt | 9e2413e | 2017-05-03 14:25:40 -0700 | [diff] [blame^] | 39 | * @param trafficPeriod traffic task period in ms |
Simon Hunt | 1911fe4 | 2017-05-02 18:25:58 -0700 | [diff] [blame] | 40 | * @param servicesBundle bundle of services |
Simon Hunt | 9e2413e | 2017-05-03 14:25:40 -0700 | [diff] [blame^] | 41 | * @param msgHandler our message handler |
Simon Hunt | 1911fe4 | 2017-05-02 18:25:58 -0700 | [diff] [blame] | 42 | */ |
Simon Hunt | 9e2413e | 2017-05-03 14:25:40 -0700 | [diff] [blame^] | 43 | public Traffic2Monitor(long trafficPeriod, ServicesBundle servicesBundle, |
| 44 | Topo2TrafficMessageHandler msgHandler) { |
Simon Hunt | 1911fe4 | 2017-05-02 18:25:58 -0700 | [diff] [blame] | 45 | super(trafficPeriod, servicesBundle); |
Simon Hunt | 9e2413e | 2017-05-03 14:25:40 -0700 | [diff] [blame^] | 46 | this.msgHandler = msgHandler; |
Simon Hunt | 1911fe4 | 2017-05-02 18:25:58 -0700 | [diff] [blame] | 47 | } |
| 48 | |
| 49 | @Override |
| 50 | protected void sendAllFlowTraffic() { |
Simon Hunt | 9e2413e | 2017-05-03 14:25:40 -0700 | [diff] [blame^] | 51 | log.debug("TOPO-2-TRAFFIC: sendAllFlowTraffic"); |
Simon Hunt | 1911fe4 | 2017-05-02 18:25:58 -0700 | [diff] [blame] | 52 | // TODO |
| 53 | } |
| 54 | |
| 55 | @Override |
| 56 | protected void sendAllPortTrafficBits() { |
Simon Hunt | 9e2413e | 2017-05-03 14:25:40 -0700 | [diff] [blame^] | 57 | log.debug("TOPO-2-TRAFFIC: sendAllPortTrafficBits"); |
Simon Hunt | 1911fe4 | 2017-05-02 18:25:58 -0700 | [diff] [blame] | 58 | // TODO |
| 59 | } |
| 60 | |
| 61 | @Override |
| 62 | protected void sendAllPortTrafficPackets() { |
Simon Hunt | 9e2413e | 2017-05-03 14:25:40 -0700 | [diff] [blame^] | 63 | log.debug("TOPO-2-TRAFFIC: sendAllPortTrafficPackets"); |
Simon Hunt | 1911fe4 | 2017-05-02 18:25:58 -0700 | [diff] [blame] | 64 | // TODO |
| 65 | } |
| 66 | |
| 67 | @Override |
Simon Hunt | 1911fe4 | 2017-05-02 18:25:58 -0700 | [diff] [blame] | 68 | protected void sendClearHighlights() { |
Simon Hunt | 9e2413e | 2017-05-03 14:25:40 -0700 | [diff] [blame^] | 69 | log.debug("TOPO-2-TRAFFIC: sendClearHighlights"); |
Simon Hunt | 1911fe4 | 2017-05-02 18:25:58 -0700 | [diff] [blame] | 70 | // TODO |
| 71 | } |
| 72 | |
Simon Hunt | 9e2413e | 2017-05-03 14:25:40 -0700 | [diff] [blame^] | 73 | |
| 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 Hunt | 1911fe4 | 2017-05-02 18:25:58 -0700 | [diff] [blame] | 83 | @Override |
| 84 | protected void clearSelection() { |
Simon Hunt | 1911fe4 | 2017-05-02 18:25:58 -0700 | [diff] [blame] | 85 | } |
| 86 | } |