Search in sources :

Example 1 with OutputServiceImpl

use of org.graylog2.streams.OutputServiceImpl in project graylog2-server by Graylog2.

the class OutputFacadeTest method setUp.

@Before
public void setUp() throws Exception {
    outputService = new OutputServiceImpl(mongodb.mongoConnection(), new MongoJackObjectMapperProvider(objectMapper), streamService, outputRegistry);
    pluginMetaData = new HashSet<>();
    outputFactories = new HashMap<>();
    outputFactories2 = new HashMap<>();
    final LoggingOutput.Factory factory = mock(LoggingOutput.Factory.class);
    final LoggingOutput.Descriptor descriptor = mock(LoggingOutput.Descriptor.class);
    when(factory.getDescriptor()).thenReturn(descriptor);
    outputFactories.put("org.graylog2.outputs.LoggingOutput", factory);
    facade = new OutputFacade(objectMapper, outputService, pluginMetaData, outputFactories, outputFactories2);
}
Also used : MongoJackObjectMapperProvider(org.graylog2.bindings.providers.MongoJackObjectMapperProvider) LoggingOutput(org.graylog2.outputs.LoggingOutput) OutputServiceImpl(org.graylog2.streams.OutputServiceImpl) Before(org.junit.Before)

Example 2 with OutputServiceImpl

use of org.graylog2.streams.OutputServiceImpl in project graylog2-server by Graylog2.

the class OutputServiceImplTest method setUp.

@Before
public void setUp() throws Exception {
    final ObjectMapper objectMapper = new ObjectMapperProvider().get();
    final MongoJackObjectMapperProvider mapperProvider = new MongoJackObjectMapperProvider(objectMapper);
    outputService = new OutputServiceImpl(mongodb.mongoConnection(), mapperProvider, streamService, outputRegistry);
}
Also used : MongoJackObjectMapperProvider(org.graylog2.bindings.providers.MongoJackObjectMapperProvider) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper) MongoJackObjectMapperProvider(org.graylog2.bindings.providers.MongoJackObjectMapperProvider) ObjectMapperProvider(org.graylog2.shared.bindings.providers.ObjectMapperProvider) Before(org.junit.Before)

Aggregations

MongoJackObjectMapperProvider (org.graylog2.bindings.providers.MongoJackObjectMapperProvider)2 Before (org.junit.Before)2 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 LoggingOutput (org.graylog2.outputs.LoggingOutput)1 ObjectMapperProvider (org.graylog2.shared.bindings.providers.ObjectMapperProvider)1 OutputServiceImpl (org.graylog2.streams.OutputServiceImpl)1