blob: efd3590db8e7a5d3d18c0d0e3c25aaeff44f890a [file] [log] [blame]
Jonghwan Hyun13a430d2018-07-22 17:02:51 +09001/*
2 * Copyright 2015-present Open Networking Foundation
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.inbandtelemetry.app;
17
18import org.apache.felix.scr.annotations.Activate;
19import org.apache.felix.scr.annotations.Deactivate;
20import org.apache.felix.scr.annotations.Reference;
21import org.apache.felix.scr.annotations.Component;
22import org.apache.felix.scr.annotations.ReferenceCardinality;
23import org.onosproject.core.CoreService;
24import org.onosproject.inbandtelemetry.api.IntService;
25import org.onosproject.net.host.HostService;
26import org.slf4j.Logger;
27import org.slf4j.LoggerFactory;
28
29@Component(immediate = true)
30public class IntControl {
31 private final Logger log = LoggerFactory.getLogger(getClass());
32// private ApplicationId appId;
33// private static final int collectorPort = 1234;
34// private static final IpAddress collectorIp = IpAddress.valueOf("10.0.0.3");
35
36 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
37 protected CoreService coreService;
38
39 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
40 protected IntService intService;
41
42 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
43 protected HostService hostService;
44
45 @Activate
46 protected void activate() {
47 coreService.registerApplication("org.onosproject.inbandtelemetry.app");
48 log.info("Started");
49 }
50
51 @Deactivate
52 protected void deactivate() {
53 log.info("Stopped");
54 }
55}