Package org.apache.juneau.rest.servlet
Class BasicRestObject
java.lang.Object
org.apache.juneau.rest.servlet.RestObject
org.apache.juneau.rest.servlet.BasicRestObject
- All Implemented Interfaces:
- BasicUniversalConfig,- DefaultConfig,- DefaultHtmlConfig,- BasicRestOperations
- Direct Known Subclasses:
- BasicRestObjectGroup,- HelloWorldResource,- HelloWorldResource,- HelloWorldResource,- HtmlBeansResource,- RequestEchoResource,- UtilityBeansResource
public abstract class BasicRestObject
extends RestObject
implements BasicRestOperations, BasicUniversalConfig
Identical to 
BasicRestServlet but doesn't extend from HttpServlet.
 Meant as a base class for child REST resources in servlet containers and Spring Boot environments.
 Provides support for JSON, XML, HTML, URL-Encoding, UON, XML, OpenAPI, and MessagePack.  See BasicUniversalConfig
 for details.
 
 Implements the basic REST endpoints defined in BasicRestOperations.
 
See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoiderror()[* /error] - Error occurred.[GET favicon.ico] - Retrieve favorites icon image.[GET /htdocs/*] - Retrieve static file.getStats(RestRequest req) [GET /stats] - Timing statistics.getSwagger(RestRequest req) [GET /api] - Show resource options.Methods inherited from class org.apache.juneau.rest.servlet.RestObjectdoLog, getContext, getRequest, getResponse, log, log, setContext
- 
Constructor Details- 
BasicRestObjectpublic BasicRestObject()
 
- 
- 
Method Details- 
getSwaggerDescription copied from interface:BasicRestOperations[GET /api] - Show resource options.- Specified by:
- getSwaggerin interface- BasicRestOperations
- Parameters:
- req- The HTTP request.
- Returns:
- A bean containing the contents for the OPTIONS page.
 
- 
getHtdocDescription copied from interface:BasicRestOperations[GET /htdocs/*] - Retrieve static file.- Specified by:
- getHtdocin interface- BasicRestOperations
- Parameters:
- path- The path to retrieve.
- locale- The locale of the HTTP request.
- Returns:
- An HTTP resource representing the static file.
- Throws:
- NotFound
 
- 
getFavIconDescription copied from interface:BasicRestOperations[GET favicon.ico] - Retrieve favorites icon image.- Specified by:
- getFavIconin interface- BasicRestOperations
- Returns:
- A bean containing the contents for the OPTIONS page.
 
- 
errorDescription copied from interface:BasicRestOperations[* /error] - Error occurred.- Specified by:
- errorin interface- BasicRestOperations
 
- 
getStatsDescription copied from interface:BasicRestOperations[GET /stats] - Timing statistics.Timing statistics for method invocations on this resource. - Specified by:
- getStatsin interface- BasicRestOperations
- Parameters:
- req- The HTTP request.
- Returns:
- A collection of timing statistics for each annotated method on this resource.
 
 
-