|
Restlet Framework 2.2.1 OSGi Environments |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.restlet.ext.servlet.ServerServlet
org.restlet.ext.spring.SpringServerServlet
public class SpringServerServlet
Spring specific ServerServlet adapter. This class is similar to the ServerServlet, but instead of creating the used Restlet Application and Restlet Component, it lookups them up from the SpringContext which is found in the ServletContext. If the Application or Component beans can't be found, the default behavior of the parent class is used.
Field Summary | |
---|---|
static String |
APPLICATION_BEAN_PARAM_NAME
Name of the Servlet parameter containing a bean-id of the application to use. |
static String |
Component_BEAN_PARAM_NAME
Name of the Servlet parameter containing a bean-id of the component to use. |
Constructor Summary | |
---|---|
SpringServerServlet()
|
Method Summary | |
---|---|
Application |
createApplication(Context parentContext)
Lookups the single Restlet Application used by this Servlet from the SpringContext inside the ServletContext. |
Component |
createComponent()
Lookups the single Restlet Component used by this Servlet from Spring's Context available inside the ServletContext. |
WebApplicationContext |
getWebApplicationContext()
Get the Spring WebApplicationContext from the ServletContext. |
Methods inherited from class org.restlet.ext.servlet.ServerServlet |
---|
createCall, createServer, createWarClient, destroy, getApplication, getComponent, getContextPath, getInitParameter, getLocalAddr, getLocalPort, getServer, init, init, init, loadClass, service |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String APPLICATION_BEAN_PARAM_NAME
public static final String Component_BEAN_PARAM_NAME
Constructor Detail |
---|
public SpringServerServlet()
Method Detail |
---|
public Application createApplication(Context parentContext)
APPLICATION_BEAN_PARAM_NAME
.
createApplication
in class ServerServlet
parentContext
- The parent component context.
public Component createComponent()
Component_BEAN_PARAM_NAME
.
createComponent
in class ServerServlet
public WebApplicationContext getWebApplicationContext()
|
Restlet Framework 2.2.1 OSGi Environments |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |