use of org.graylog.integrations.aws.codecs.KinesisCloudWatchFlowLogCodec in project graylog-plugin-integrations by Graylog2.
the class AWSTestingUtils method buildTestCodecs.
public static Map<String, Codec.Factory<? extends Codec>> buildTestCodecs() {
// Prepare test codecs. These have to be manually instantiated for the test context.
Map<String, Codec.Factory<? extends Codec>> availableCodecs = new HashMap<>();
ObjectMapper objectMapper = new ObjectMapperProvider().get();
availableCodecs.put(KinesisRawLogCodec.NAME, new KinesisRawLogCodec.Factory() {
@Override
public KinesisRawLogCodec create(Configuration configuration) {
return new KinesisRawLogCodec(configuration, objectMapper);
}
@Override
public KinesisRawLogCodec.Config getConfig() {
return null;
}
@Override
public Codec.Descriptor getDescriptor() {
return null;
}
});
availableCodecs.put(KinesisCloudWatchFlowLogCodec.NAME, new KinesisCloudWatchFlowLogCodec.Factory() {
@Override
public KinesisCloudWatchFlowLogCodec create(Configuration configuration) {
return new KinesisCloudWatchFlowLogCodec(configuration, objectMapper);
}
@Override
public KinesisCloudWatchFlowLogCodec.Config getConfig() {
return null;
}
@Override
public Codec.Descriptor getDescriptor() {
return null;
}
});
return availableCodecs;
}
Aggregations