Class RestSupportImpl
- java.lang.Object
- 
- org.apache.tapestry5.http.internal.services.RestSupportImpl
 
- 
- All Implemented Interfaces:
- RestSupport
 
 public class RestSupportImpl extends java.lang.Object implements RestSupport Default RestSupport implementation.
- 
- 
Constructor SummaryConstructors Constructor Description RestSupportImpl(javax.servlet.http.HttpServletRequest request, HttpRequestBodyConverter converter)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> java.util.Optional<T>getRequestBodyAs(java.lang.Class<T> type)Returns, if present, the body of the request body coerced to a given type.booleanisHttpDelete()Is this request a HEAD?booleanisHttpGet()Is this request a GET?booleanisHttpHead()Is this request a HEAD?booleanisHttpPatch()Is this request a HEAD?booleanisHttpPost()Is this request a POST?booleanisHttpPut()Is this request a PUT?
 
- 
- 
- 
Constructor Detail- 
RestSupportImplpublic RestSupportImpl(javax.servlet.http.HttpServletRequest request, HttpRequestBodyConverter converter) 
 
- 
 - 
Method Detail- 
isHttpGetpublic boolean isHttpGet() Description copied from interface:RestSupportIs this request a GET?- Specified by:
- isHttpGetin interface- RestSupport
- Returns:
- trueor- false
 
 - 
isHttpPostpublic boolean isHttpPost() Description copied from interface:RestSupportIs this request a POST?- Specified by:
- isHttpPostin interface- RestSupport
- Returns:
- trueor- false
 
 - 
isHttpHeadpublic boolean isHttpHead() Description copied from interface:RestSupportIs this request a HEAD?- Specified by:
- isHttpHeadin interface- RestSupport
- Returns:
- trueor- false
 
 - 
isHttpPutpublic boolean isHttpPut() Description copied from interface:RestSupportIs this request a PUT?- Specified by:
- isHttpPutin interface- RestSupport
- Returns:
- trueor- false
 
 - 
isHttpDeletepublic boolean isHttpDelete() Description copied from interface:RestSupportIs this request a HEAD?- Specified by:
- isHttpDeletein interface- RestSupport
- Returns:
- trueor- false
 
 - 
isHttpPatchpublic boolean isHttpPatch() Description copied from interface:RestSupportIs this request a HEAD?- Specified by:
- isHttpPatchin interface- RestSupport
- Returns:
- trueor- false
 
 - 
getRequestBodyAspublic <T> java.util.Optional<T> getRequestBodyAs(java.lang.Class<T> type) Description copied from interface:RestSupportReturns, if present, the body of the request body coerced to a given type. If the body is empty, an empty Optional is returned. Coercions are done through, which uses TypeCoercer as a fallback (coercing HttpServletRequest to the target type).- Specified by:
- getRequestBodyAsin interface- RestSupport
- Type Parameters:
- T- the type of the return value.
- Parameters:
- type- the target type.
- Returns:
- an Optionalwrapping the resulting object.
 
 
- 
 
-