blob: 7d479ea6df9242691e7b23e9dcfc72cab8b9a340 [file] [log] [blame]
Brian O'Connorc67f9fa2014-08-07 18:17:46 -07001package net.floodlightcontroller.debugevent;
2
3import java.util.ArrayList;
4import java.util.Collection;
5import java.util.Collections;
6import java.util.HashMap;
7import java.util.List;
8import java.util.Map;
9
10import net.floodlightcontroller.core.module.FloodlightModuleContext;
11import net.floodlightcontroller.core.module.FloodlightModuleException;
12import net.floodlightcontroller.core.module.IFloodlightModule;
13import net.floodlightcontroller.core.module.IFloodlightService;
14
15public class NullDebugEvent implements IFloodlightModule, IDebugEventService {
16
17
18 @Override
19 public void flushEvents() {
20
21 }
22
23 @Override
24 public Collection<Class<? extends IFloodlightService>>
25 getModuleServices() {
26 Collection<Class<? extends IFloodlightService>> services =
27 new ArrayList<Class<? extends IFloodlightService>>(1);
28 services.add(IDebugEventService.class);
29 return services;
30 }
31
32 @Override
33 public Map<Class<? extends IFloodlightService>, IFloodlightService>
34 getServiceImpls() {
35 Map<Class<? extends IFloodlightService>,
36 IFloodlightService> m =
37 new HashMap<Class<? extends IFloodlightService>,
38 IFloodlightService>();
39 m.put(IDebugEventService.class, this);
40 return m;
41 }
42
43 @Override
44 public Collection<Class<? extends IFloodlightService>>
45 getModuleDependencies() {
46 return null;
47 }
48
49 @Override
50 public void init(FloodlightModuleContext context)
51 throws FloodlightModuleException {
52
53 }
54
55 @Override
56 public void startUp(FloodlightModuleContext context)
57 throws FloodlightModuleException {
58
59 }
60
61 @Override
62 public boolean containsModuleEventName(String moduleName, String eventName) {
63 return false;
64 }
65
66 @Override
67 public boolean containsModuleName(String moduleName) {
68 return false;
69 }
70
71 @Override
72 public List<DebugEventInfo> getAllEventHistory() {
73 return Collections.emptyList();
74 }
75
76 @Override
77 public List<DebugEventInfo> getModuleEventHistory(String param) {
78 return Collections.emptyList();
79 }
80
81 @Override
82 public DebugEventInfo getSingleEventHistory(String moduleName, String eventName,
83 int last) {
84 return null;
85 }
86
87 @Override
88 public void resetAllEvents() {
89
90 }
91
92 @Override
93 public void resetAllModuleEvents(String moduleName) {
94
95 }
96
97 @Override
98 public void resetSingleEvent(String moduleName, String eventName) {
99
100 }
101
102 @Override
103 public <T> IEventUpdater<T>
104 registerEvent(String moduleName, String eventName,
105 String eventDescription, EventType eventType,
106 Class<T> eventClass, int bufferCapacity,
107 String... metaData) throws MaxEventsRegistered {
108 return new NullEventImpl<T>();
109 }
110
111 public class NullEventImpl<T> implements IEventUpdater<T> {
112
113 @Override
114 public void updateEventNoFlush(Object event) {
115
116 }
117
118 @Override
119 public void updateEventWithFlush(Object event) {
120
121 }
122
123 }
124
125 @Override
126 public List<String> getModuleList() {
127 return Collections.emptyList();
128 }
129
130 @Override
131 public List<String> getModuleEventList(String moduleName) {
132 return Collections.emptyList();
133 }
134
135}