public class PortletInvocableHandlerMethod extends InvocableHandlerMethod
InvocableHandlerMethod
with the ability to handle return values through a registered HandlerMethodReturnValueHandler
and also supports setting the response status based on a method-level @
ResponseStatus
annotation.
A null
return value (including void) may be interpreted as the end of request processing in combination
with a @ResponseStatus
annotation, a not-modified check condition (see ServletWebRequest.checkNotModified(long)
), or a method argument that provides access to the response stream.
HandlerMethod.HandlerMethodParameter
logger
Constructor and Description |
---|
PortletInvocableHandlerMethod(HandlerMethod handlerMethod)
Create an instance from a
HandlerMethod . |
PortletInvocableHandlerMethod(Object handler,
Method method)
Creates an instance from the given handler and method.
|
Modifier and Type | Method and Description |
---|---|
void |
invokeAndHandle(PortletWebRequest webRequest,
ModelAndViewContainer mavContainer,
Object... providedArgs)
Invoke the method and handle the return value through one of the configured
HandlerMethodReturnValueHandlers . |
void |
setHandlerMethodReturnValueHandlers(HandlerMethodReturnValueHandlerComposite returnValueHandlers)
Register
HandlerMethodReturnValueHandler instances to use to handle return values. |
doInvoke, getMethodArgumentValues, invokeForRequest, setDataBinderFactory, setHandlerMethodArgumentResolvers, setParameterNameDiscoverer
assertTargetBean, createWithResolvedBean, equals, findProvidedArgument, formatArgumentError, formatInvokeError, getBean, getBeanType, getBridgedMethod, getMethod, getMethodAnnotation, getMethodParameters, getResolvedFromHandlerMethod, getResponseStatus, getResponseStatusReason, getReturnType, getReturnValueType, getShortLogMessage, hashCode, hasMethodAnnotation, isVoid, toString
public PortletInvocableHandlerMethod(HandlerMethod handlerMethod)
HandlerMethod
.public void invokeAndHandle(PortletWebRequest webRequest, ModelAndViewContainer mavContainer, Object... providedArgs) throws Exception
HandlerMethodReturnValueHandlers
.webRequest
- the current requestmavContainer
- the ModelAndViewContainer for this requestprovidedArgs
- "given" arguments matched by type (not resolved)Exception
public void setHandlerMethodReturnValueHandlers(HandlerMethodReturnValueHandlerComposite returnValueHandlers)
HandlerMethodReturnValueHandler
instances to use to handle return values.Copyright © 2019 Liferay, Inc.. All rights reserved.