blob: 86a5f1b5e3ac2185b47c715e3cdf4ac11f1c4b55 [file] [log] [blame]
Hyunsun Moone7e4bb32016-05-16 04:32:45 -07001/*
2 * Copyright 2016-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 */
alshabibb4d31712016-06-01 18:51:03 -070016package org.opencord.cordvtn.impl.service;
Hyunsun Moone7e4bb32016-05-16 04:32:45 -070017
18import org.apache.felix.scr.annotations.Activate;
19import org.apache.felix.scr.annotations.Component;
20
21import org.apache.felix.scr.annotations.Deactivate;
alshabibb4d31712016-06-01 18:51:03 -070022import org.opencord.cordvtn.api.Instance;
23import org.opencord.cordvtn.api.InstanceHandler;
24import org.opencord.cordvtn.impl.CordVtnInstanceHandler;
Hyunsun Moone7e4bb32016-05-16 04:32:45 -070025import org.onosproject.xosclient.api.VtnService;
26
27import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor;
28import static org.onlab.util.Tools.groupedThreads;
29
30/**
31 * Provides network connectivity for dummy service instances.
32 */
33@Component(immediate = true)
34public class DummyInstanceHandler extends CordVtnInstanceHandler implements InstanceHandler {
35
36 @Activate
37 protected void activate() {
38 serviceType = VtnService.ServiceType.DUMMY;
39 eventExecutor = newSingleThreadScheduledExecutor(groupedThreads("onos/cordvtn-dummy", "event-handler"));
40 super.activate();
41 }
42
43 @Deactivate
44 protected void deactivate() {
45 super.deactivate();
46 }
47
48 @Override
49 public void instanceDetected(Instance instance) {
50 super.instanceDetected(instance);
51 }
52
53 @Override
54 public void instanceRemoved(Instance instance) {
55 super.instanceRemoved(instance);
56 }
57}