Package io.lettuce.core.dynamic.output
Class OutputRegistryCommandOutputFactoryResolver
- java.lang.Object
-
- io.lettuce.core.dynamic.output.CommandOutputResolverSupport
-
- io.lettuce.core.dynamic.output.OutputRegistryCommandOutputFactoryResolver
-
- All Implemented Interfaces:
CommandOutputFactoryResolver
public class OutputRegistryCommandOutputFactoryResolver extends CommandOutputResolverSupport implements CommandOutputFactoryResolver
CommandOutputFactoryResolver
usingOutputRegistry
to resolve aCommandOutputFactory
.Types registered in
OutputRegistry
are inspected for the types they produce and matched with the declared repository method. If resolution yields multipleCommandOutput
s, the first matched output is used.- Since:
- 5.0
- Author:
- Mark Paluch
- See Also:
OutputRegistry
-
-
Constructor Summary
Constructors Constructor Description OutputRegistryCommandOutputFactoryResolver(OutputRegistry outputRegistry)
Create a newOutputRegistryCommandOutputFactoryResolver
givenOutputRegistry
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandOutputFactory
resolveCommandOutput(OutputSelector outputSelector)
Resolve a regularCommandOutputFactory
that produces theCommandOutput
result component type.CommandOutputFactory
resolveStreamingCommandOutput(OutputSelector outputSelector)
Resolve a streamingCommandOutputFactory
that produces theStreamingOutput
result component type.-
Methods inherited from class io.lettuce.core.dynamic.output.CommandOutputResolverSupport
isAssignableFrom
-
-
-
-
Constructor Detail
-
OutputRegistryCommandOutputFactoryResolver
public OutputRegistryCommandOutputFactoryResolver(OutputRegistry outputRegistry)
Create a newOutputRegistryCommandOutputFactoryResolver
givenOutputRegistry
.- Parameters:
outputRegistry
- must not benull
.
-
-
Method Detail
-
resolveCommandOutput
public CommandOutputFactory resolveCommandOutput(OutputSelector outputSelector)
Description copied from interface:CommandOutputFactoryResolver
Resolve a regularCommandOutputFactory
that produces theCommandOutput
result component type.- Specified by:
resolveCommandOutput
in interfaceCommandOutputFactoryResolver
- Parameters:
outputSelector
- must not benull
.- Returns:
- the
CommandOutputFactory
if resolved,null
otherwise.
-
resolveStreamingCommandOutput
public CommandOutputFactory resolveStreamingCommandOutput(OutputSelector outputSelector)
Description copied from interface:CommandOutputFactoryResolver
Resolve a streamingCommandOutputFactory
that produces theStreamingOutput
result component type.- Specified by:
resolveStreamingCommandOutput
in interfaceCommandOutputFactoryResolver
- Parameters:
outputSelector
- must not benull
.- Returns:
- the
CommandOutputFactory
that implementsStreamingOutput
if resolved,null
otherwise.
-
-