com.orange.cepheus.cep.Application Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cepheus-cep Show documentation
Show all versions of cepheus-cep Show documentation
Cepheus-CEP is a CEP (Complex Event Processor), it uses the Esper engine.
/*
* 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();
}
}