Module lettuce.core
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 using OutputRegistry to resolve a CommandOutputFactory.
Types registered in OutputRegistry are inspected for the types they produce and matched with the declared repository
method. If resolution yields multiple CommandOutputs, 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 newOutputRegistryCommandOutputFactoryResolvergivenOutputRegistry. -
Method Summary
Modifier and Type Method Description CommandOutputFactoryresolveCommandOutput(OutputSelector outputSelector)Resolve a regularCommandOutputFactorythat produces theCommandOutputresult component type.CommandOutputFactoryresolveStreamingCommandOutput(OutputSelector outputSelector)Resolve a streamingCommandOutputFactorythat produces theStreamingOutputresult component type.Methods inherited from class io.lettuce.core.dynamic.output.CommandOutputResolverSupport
isAssignableFrom
-
Constructor Details
-
OutputRegistryCommandOutputFactoryResolver
Create a newOutputRegistryCommandOutputFactoryResolvergivenOutputRegistry.- Parameters:
outputRegistry- must not benull.
-
-
Method Details
-
resolveCommandOutput
Description copied from interface:CommandOutputFactoryResolverResolve a regularCommandOutputFactorythat produces theCommandOutputresult component type.- Specified by:
resolveCommandOutputin interfaceCommandOutputFactoryResolver- Parameters:
outputSelector- must not benull.- Returns:
- the
CommandOutputFactoryif resolved,nullotherwise.
-
resolveStreamingCommandOutput
Description copied from interface:CommandOutputFactoryResolverResolve a streamingCommandOutputFactorythat produces theStreamingOutputresult component type.- Specified by:
resolveStreamingCommandOutputin interfaceCommandOutputFactoryResolver- Parameters:
outputSelector- must not benull.- Returns:
- the
CommandOutputFactorythat implementsStreamingOutputif resolved,nullotherwise.
-