Integrate sdc notification
[externalapi/nbi.git] / src / main / java / org / onap / nbi / apis / hub / service / dmaap / DMaaPEventsScheduler.java
1 /**
2  * Copyright (c) 2019 Huawei
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
5  * the License. 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 distributed under the License is distributed on
10  * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
11  * specific language governing permissions and limitations under the License.
12  */
13
14 package org.onap.nbi.apis.hub.service.dmaap;
15
16 import org.springframework.beans.factory.annotation.Autowired;
17 import org.springframework.context.annotation.Profile;
18 import org.springframework.scheduling.annotation.EnableScheduling;
19 import org.springframework.scheduling.annotation.Scheduled;
20 import org.springframework.stereotype.Service;
21
22 @Profile("default")
23 @Service
24 @EnableScheduling
25 public class DMaaPEventsScheduler {
26
27     @Autowired
28     CheckDMaaPEventsManager checkDMaaPEventsManager;
29
30     @Scheduled(fixedDelayString = "${dmaapCheck.schedule}",
31         initialDelayString = "${dmaapCheck.initial}")
32     private void processDMaaPEvents() {
33         checkDMaaPEventsManager.checkForDMaaPAAIEvents();
34         checkDMaaPEventsManager.checkForDMaaPSDCEvents();
35
36     }
37 }
38