blob: f0892282db4c9282afe0bd055ad71ddf629419ba [file] [log] [blame]
Jon Hall6b687cd2015-04-23 20:04:59 -07001/*
2 * Copyright 2015 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 */
16package org.onosproject.distributedprimitives;
17
18import org.apache.felix.scr.annotations.Activate;
19import org.apache.felix.scr.annotations.Component;
20import org.apache.felix.scr.annotations.Deactivate;
21import org.apache.felix.scr.annotations.Reference;
22import org.apache.felix.scr.annotations.ReferenceCardinality;
23import org.onosproject.core.ApplicationId;
24import org.onosproject.core.CoreService;
25import org.slf4j.Logger;
26
27import static org.slf4j.LoggerFactory.getLogger;
28
29
30/**
31 * Simple application to test distributed primitives.
32 */
33@Component(immediate = true)
34public class DistributedPrimitivesTest {
35
36 private final Logger log = getLogger(getClass());
37
38 private static final String APP_NAME = "org.onosproject.distributedprimitives";
39 private ApplicationId appId;
40
41 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
42 protected CoreService coreService;
43
44
45 @Activate
46 protected void activate() {
47
48 log.info("Distributed-Primitives-test app started");
49 appId = coreService.registerApplication(APP_NAME);
50 }
51
52 @Deactivate
53 protected void deactivate() {
54
55 log.info("Distributed-Primitives-test app Stopped");
56 }
57}