All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.orange.cepheus.cep.Application Maven / Gradle / Ivy

There is a newer version: 1.0.0
Show newest version
/*
 * Copyright (C) 2015 Orange
 *
 * This software is distributed under the terms and conditions of the 'GNU GENERAL PUBLIC LICENSE
 * Version 2' license which can be found in the file 'LICENSE.txt' in this package distribution or
 * at 'http://www.gnu.org/licenses/gpl-2.0-standalone.html'.
 */

package com.orange.cepheus.cep;

import com.orange.cepheus.cep.persistence.JsonPersistence;
import com.orange.cepheus.cep.persistence.Persistence;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.TaskScheduler;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler;

@SpringBootApplication
@ComponentScan("com.orange")
@EnableScheduling
public class Application {

    public static void main(String[] args) {
        new SpringApplicationBuilder()
                .sources(Application.class)
                .showBanner(false)
                .run(args);
    }

    @Bean
    public ComplexEventProcessor complexEventProcessor() {
        return new EsperEventProcessor();
    }

    @Bean
    public Persistence persistence() {
        return new JsonPersistence();
    }

    @Bean
    public SubscriptionManager subscriptionManager() {
        return new SubscriptionManager();
    }

    @Bean
    public TaskScheduler taskScheduler() {
        return new ThreadPoolTaskScheduler();
    }

    @Bean
    public Init init() {
        return new Init();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy