Package org.springframework.shell.result
Class GenericResultHandlerService
java.lang.Object
org.springframework.shell.result.GenericResultHandlerService
- All Implemented Interfaces:
ResultHandlerService
Base implementation suitable for use in most
environments.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> void
addResultHandler
(Class<T> resultType, ResultHandler<? super T> resultHandler) Add a plain result handler to this registry.void
addResultHandler
(GenericResultHandler handler) Add a generic result handler this this registry.void
addResultHandler
(ResultHandler<?> resultHandler) Add a plain result handler to this registry.void
Handle result.void
Handle result to the specifiedTypeDescriptor
.
-
Constructor Details
-
GenericResultHandlerService
public GenericResultHandlerService()
-
-
Method Details
-
handle
Description copied from interface:ResultHandlerService
Handle result.- Specified by:
handle
in interfaceResultHandlerService
- Parameters:
source
- the result
-
handle
Description copied from interface:ResultHandlerService
Handle result to the specifiedTypeDescriptor
.- Specified by:
handle
in interfaceResultHandlerService
- Parameters:
result
- the resultresultType
- the result type
-
addResultHandler
Add a plain result handler to this registry.- Parameters:
resultHandler
- the result handler
-
addResultHandler
Add a plain result handler to this registry.- Type Parameters:
T
- the type of result handler- Parameters:
resultType
- the class of a result typeresultHandler
- the result handler
-
addResultHandler
Add a generic result handler this this registry.- Parameters:
handler
- the generic result handler
-