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
Constructors -
Method Summary
Modifier and TypeMethodDescription<T> voidaddResultHandler(Class<T> resultType, ResultHandler<? super T> resultHandler) Add a plain result handler to this registry.voidaddResultHandler(GenericResultHandler handler) Add a generic result handler this this registry.voidaddResultHandler(ResultHandler<?> resultHandler) Add a plain result handler to this registry.voidHandle result.voidHandle result to the specifiedTypeDescriptor.
-
Constructor Details
-
GenericResultHandlerService
public GenericResultHandlerService()
-
-
Method Details
-
handle
Description copied from interface:ResultHandlerServiceHandle result.- Specified by:
handlein interfaceResultHandlerService- Parameters:
source- the result
-
handle
Description copied from interface:ResultHandlerServiceHandle result to the specifiedTypeDescriptor.- Specified by:
handlein 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
-