blob: 37dfc8500fec85e6a645bc9379b96c3efd4dc3a2 [file] [log] [blame]
Andrea Campanella945ded22016-01-07 13:17:43 -08001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2016-present Open Networking Laboratory
Andrea Campanella945ded22016-01-07 13:17:43 -08003 *
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
17package org.onosproject.protocol.rest.ctl;
18
Andrea Campanella945ded22016-01-07 13:17:43 -080019import org.apache.felix.scr.annotations.Activate;
20import org.apache.felix.scr.annotations.Component;
21import org.apache.felix.scr.annotations.Deactivate;
22import org.apache.felix.scr.annotations.Service;
Hesam Rahimi4a409b42016-08-12 18:37:33 -040023import org.onosproject.protocol.http.ctl.HttpSBControllerImpl;
Andrea Campanella945ded22016-01-07 13:17:43 -080024import org.onosproject.protocol.rest.RestSBController;
Andrea Campanella945ded22016-01-07 13:17:43 -080025import org.slf4j.Logger;
26import org.slf4j.LoggerFactory;
27
Andrea Campanella945ded22016-01-07 13:17:43 -080028/**
29 * The implementation of RestSBController.
30 */
31@Component(immediate = true)
32@Service
Hesam Rahimi4a409b42016-08-12 18:37:33 -040033public class RestSBControllerImpl extends HttpSBControllerImpl implements RestSBController {
Andrea Campanella945ded22016-01-07 13:17:43 -080034
35 private static final Logger log =
36 LoggerFactory.getLogger(RestSBControllerImpl.class);
Andrea Campanella945ded22016-01-07 13:17:43 -080037
38 @Activate
Andrea Campanellace279ee2016-01-25 10:21:45 -080039 public void activate() {
Andrea Campanella945ded22016-01-07 13:17:43 -080040 log.info("Started");
41 }
42
43 @Deactivate
44 public void deactivate() {
Hesam Rahimi4a409b42016-08-12 18:37:33 -040045 this.getClientMap().clear();
46 this.getDeviceMap().clear();
Andrea Campanella945ded22016-01-07 13:17:43 -080047 log.info("Stopped");
48 }
49
Andrea Campanella945ded22016-01-07 13:17:43 -080050}