Search in sources :

Example 1 with CodecAwareOutputFactoryResolver

use of io.lettuce.core.dynamic.output.CodecAwareOutputFactoryResolver in project lettuce-core by lettuce-io.

the class CommandSegmentCommandFactoryUnitTests method createCommand.

@SuppressWarnings("unchecked")
private RedisCommand<?, ?, ?> createCommand(CommandMethod commandMethod, RedisCodec<?, ?> codec, Object... args) {
    CommandSegmentFactory segmentFactory = new AnnotationCommandSegmentFactory();
    CodecAwareOutputFactoryResolver outputFactoryResolver = new CodecAwareOutputFactoryResolver(new OutputRegistryCommandOutputFactoryResolver(new OutputRegistry()), codec);
    CommandSegmentCommandFactory factory = new CommandSegmentCommandFactory(segmentFactory.createCommandSegments(commandMethod), commandMethod, codec, outputFactoryResolver);
    return factory.createCommand(args);
}
Also used : AnnotationCommandSegmentFactory(io.lettuce.core.dynamic.segment.AnnotationCommandSegmentFactory) OutputRegistryCommandOutputFactoryResolver(io.lettuce.core.dynamic.output.OutputRegistryCommandOutputFactoryResolver) OutputRegistry(io.lettuce.core.dynamic.output.OutputRegistry) CommandSegmentFactory(io.lettuce.core.dynamic.segment.CommandSegmentFactory) AnnotationCommandSegmentFactory(io.lettuce.core.dynamic.segment.AnnotationCommandSegmentFactory) CodecAwareOutputFactoryResolver(io.lettuce.core.dynamic.output.CodecAwareOutputFactoryResolver)

Aggregations

CodecAwareOutputFactoryResolver (io.lettuce.core.dynamic.output.CodecAwareOutputFactoryResolver)1 OutputRegistry (io.lettuce.core.dynamic.output.OutputRegistry)1 OutputRegistryCommandOutputFactoryResolver (io.lettuce.core.dynamic.output.OutputRegistryCommandOutputFactoryResolver)1 AnnotationCommandSegmentFactory (io.lettuce.core.dynamic.segment.AnnotationCommandSegmentFactory)1 CommandSegmentFactory (io.lettuce.core.dynamic.segment.CommandSegmentFactory)1