Open Kilda Java Documentation
KildaModule.java
Go to the documentation of this file.
1 /* Copyright 2018 Telstra Open Source
2  *
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 package org.openkilda.floodlight;
17 
22 
23 import com.google.common.collect.ImmutableList;
24 import com.google.common.collect.ImmutableMap;
25 import net.floodlightcontroller.core.IFloodlightProviderService;
26 import net.floodlightcontroller.core.internal.IOFSwitchService;
27 import net.floodlightcontroller.core.module.FloodlightModuleContext;
28 import net.floodlightcontroller.core.module.FloodlightModuleException;
29 import net.floodlightcontroller.core.module.IFloodlightModule;
30 import net.floodlightcontroller.core.module.IFloodlightService;
31 import net.floodlightcontroller.threadpool.IThreadPoolService;
32 
33 import java.util.Collection;
34 import java.util.Map;
35 
36 public class KildaModule implements IFloodlightModule {
37  OfBatchService ofBatchService = new OfBatchService();
38  FlowVerificationService flowVerificationService = new FlowVerificationService();
39 
40  @Override
41  public Collection<Class<? extends IFloodlightService>> getModuleServices() {
42  return ImmutableList.of(
43  OfBatchService.class,
45  }
46 
47  @Override
48  public Map<Class<? extends IFloodlightService>, IFloodlightService> getServiceImpls() {
49  return ImmutableMap.of(
50  OfBatchService.class, ofBatchService,
51  FlowVerificationService.class, flowVerificationService);
52  }
53 
54  @Override
55  public Collection<Class<? extends IFloodlightService>> getModuleDependencies() {
56  return ImmutableList.of(
57  IFloodlightProviderService.class,
58  IOFSwitchService.class,
59  IThreadPoolService.class,
62  }
63 
64  @Override
65  public void init(FloodlightModuleContext context) throws FloodlightModuleException {
66 
67  }
68 
69  @Override
70  public void startUp(FloodlightModuleContext context) throws FloodlightModuleException {
71  ofBatchService.init(context);
72  flowVerificationService.init(context);
73  }
74 }
void init(FloodlightModuleContext context)
void init(FloodlightModuleContext moduleContext)
Collection< Class<? extends IFloodlightService > > getModuleServices()
void startUp(FloodlightModuleContext context)
Collection< Class<? extends IFloodlightService > > getModuleDependencies()
Map< Class<? extends IFloodlightService >, IFloodlightService > getServiceImpls()
net
Definition: plan-b.py:46