Search in sources :

Example 1 with MongoDbPipelineStreamConnectionsService

use of org.graylog.plugins.pipelineprocessor.db.mongodb.MongoDbPipelineStreamConnectionsService in project graylog2-server by Graylog2.

the class PipelineFacadeTest method setUp.

@Before
@SuppressForbidden("Using Executors.newSingleThreadExecutor() is okay in tests")
public void setUp() throws Exception {
    final MongoConnection mongoConnection = mongodb.mongoConnection();
    final MongoJackObjectMapperProvider mapperProvider = new MongoJackObjectMapperProvider(objectMapper);
    final ClusterEventBus clusterEventBus = new ClusterEventBus("cluster-event-bus", Executors.newSingleThreadExecutor());
    pipelineService = new MongoDbPipelineService(mongoConnection, mapperProvider, clusterEventBus);
    connectionsService = new MongoDbPipelineStreamConnectionsService(mongoConnection, mapperProvider, clusterEventBus);
    facade = new PipelineFacade(objectMapper, pipelineService, connectionsService, pipelineRuleParser, ruleService, streamService);
}
Also used : MongoDbPipelineService(org.graylog.plugins.pipelineprocessor.db.mongodb.MongoDbPipelineService) MongoJackObjectMapperProvider(org.graylog2.bindings.providers.MongoJackObjectMapperProvider) MongoDbPipelineStreamConnectionsService(org.graylog.plugins.pipelineprocessor.db.mongodb.MongoDbPipelineStreamConnectionsService) MongoConnection(org.graylog2.database.MongoConnection) ClusterEventBus(org.graylog2.events.ClusterEventBus) Before(org.junit.Before) SuppressForbidden(org.graylog2.shared.SuppressForbidden)

Aggregations

MongoDbPipelineService (org.graylog.plugins.pipelineprocessor.db.mongodb.MongoDbPipelineService)1 MongoDbPipelineStreamConnectionsService (org.graylog.plugins.pipelineprocessor.db.mongodb.MongoDbPipelineStreamConnectionsService)1 MongoJackObjectMapperProvider (org.graylog2.bindings.providers.MongoJackObjectMapperProvider)1 MongoConnection (org.graylog2.database.MongoConnection)1 ClusterEventBus (org.graylog2.events.ClusterEventBus)1 SuppressForbidden (org.graylog2.shared.SuppressForbidden)1 Before (org.junit.Before)1