public class RestApplication
extends Application
REST application class.
RestAapplication is the basic unit for the deployment of REST applications, and it is independent of the operating environment. RestAapplication can be deployed in the Restlet Component, through the configuration and a small amount of code can also be deployed to a variety of environments, such as Servlet containers, OSGI kernel, Guice Ioc containers, standalone JVMS, Groovy, Scala, JAIN / SLEE, etc.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
RESTCONTEXTNAME
${services_rest_RestApplication_attribute_RESTCONTEXTNAME_Title}
|
Constructor and Description |
---|
RestApplication()
${services_rest_RestApplication_constructor_RestApplicationByDefault_Title}
|
RestApplication(RestContext restContext)
${services_rest_RestApplication_constructor_RestApplicationByContext_Title}
|
Modifier and Type | Method and Description |
---|---|
void |
addFilter(Filter filter)
${services_rest_RestApplication_method_addFilter_Title}
|
void |
addResourceBinding(java.util.Map<java.lang.String,java.lang.Class<? extends ServerResource>> bindings)
${services_rest_RestApplication_method_addResourceBinding_Title}
|
boolean |
attach(java.lang.String urlTemplate, Restlet handler)
${services_rest_RestApplication_method_attach_Title}
|
Restlet |
createInboundRoot()
${services_rest_RestApplication_method_createRoot_Title}
|
Filter |
getFirstFilter() |
RestContext |
getRestContext()
${services_rest_RestApplication_method_getRestContext_Title}
|
void |
setRestContext(RestContext restContext)
${services_rest_RestApplication_method_setRestContext_Title}
|
public static final java.lang.String RESTCONTEXTNAME
${services_rest_RestApplication_attribute_RESTCONTEXTNAME_Title}
${services_rest_RestApplication_attribute_RESTCONTEXTNAME_Description}
public RestApplication(RestContext restContext)
${services_rest_RestApplication_constructor_RestApplicationByContext_Title}
${services_rest_RestApplication_constructor_RestApplicationByContext_Description}
restContext
- ${services_rest_RestApplication_constructor_RestApplicationByContext_param_restContext}public RestApplication()
${services_rest_RestApplication_constructor_RestApplicationByDefault_Title}
${services_rest_RestApplication_constructor_RestApplicationByDefault_Description}
public void setRestContext(RestContext restContext)
${services_rest_RestApplication_method_setRestContext_Title}
${services_rest_RestApplication_method_setRestContext_Description}
restContext
- ${services_rest_RestApplication_method_setRestContext_param_restContext}public RestContext getRestContext()
${services_rest_RestApplication_method_getRestContext_Title}
${services_rest_RestApplication_method_getRestContext_Description}
public Restlet createInboundRoot()
${services_rest_RestApplication_method_createRoot_Title}
${services_rest_RestApplication_method_createRoot_Description}
public void addFilter(Filter filter)
${services_rest_RestApplication_method_addFilter_Title}
${services_rest_RestApplication_method_addFilter_Description}
filter
- ${services_rest_RestApplication_method_addFilter_param_filter}public void addResourceBinding(java.util.Map<java.lang.String,java.lang.Class<? extends ServerResource>> bindings)
${services_rest_RestApplication_method_addResourceBinding_Title}
${services_rest_RestApplication_method_addResourceBinding_Description}
bindings
- ${services_rest_RestApplication_method_addResourceBinding_param_bindings}public boolean attach(java.lang.String urlTemplate, Restlet handler)
${services_rest_RestApplication_method_attach_Title}
${services_rest_RestApplication_method_attach_Description}
urlTemplate
- ${services_rest_RestApplication_method_attach_param_urlTemplate}handler
- ${services_rest_RestApplication_method_attach_param_handler}public Filter getFirstFilter()