|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.GenericServlet org.apache.sling.launchpad.webapp.SlingServlet
public class SlingServlet
The SlingServlet
is the externally visible Web Application
launcher for Sling. Please refer to the full description The Sling
Launchpad on the Sling Wiki for a full description of this class.
Logging goes to ServletContext.log methods.
This class goes into the secondary artifact with the classifier webapp to be used as the main servlet to be registered in the servlet container.
Constructor Summary | |
---|---|
SlingServlet()
|
Method Summary | |
---|---|
void |
destroy()
Stop the Sling framework when the web application is being stopped |
java.lang.String |
getServletInfo()
|
void |
init()
Launches the SLing framework if the sling.home setting can be derived from the configuration or the SerlvetContext. |
void |
service(javax.servlet.ServletRequest req,
javax.servlet.ServletResponse res)
If Sling has already been started, the request is forwarded to the started Sling framework. |
void |
stopped()
The framework has been stopped by calling the Bundle.stop()
on the system bundle. |
void |
updated(java.io.File updateFile)
The framework has been stopped with the intent to be restarted by calling either of the Bundle.update methods on the system bundle. |
Methods inherited from class javax.servlet.GenericServlet |
---|
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SlingServlet()
Method Detail |
---|
public void init()
init
in class javax.servlet.GenericServlet
public java.lang.String getServletInfo()
getServletInfo
in interface javax.servlet.Servlet
getServletInfo
in class javax.servlet.GenericServlet
public void service(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res) throws javax.servlet.ServletException, java.io.IOException
If the request is not forwarded to Sling, this method returns a 404/NOT FOUND if the startup failure counter has exceeded or 503/SERVICE UNAVAILABLE if the Sling framework is starting up.
If a request causes the framework to start, it is immediately terminated with said response status and framework is started in a separate thread.
service
in interface javax.servlet.Servlet
service
in class javax.servlet.GenericServlet
javax.servlet.ServletException
java.io.IOException
public void destroy()
destroy
in interface javax.servlet.Servlet
destroy
in class javax.servlet.GenericServlet
public void stopped()
Bundle.stop()
on the system bundle. This actually terminates the Sling Standalone
application.
Note, that a new request coming in while the web application is still running, will actually cause Sling to restart !
stopped
in interface Notifiable
public void updated(java.io.File updateFile)
Bundle.update
methods on the system bundle.
If an InputStream
was provided, this has been copied to a
temporary file, which will be used in place of the existing launcher jar
file.
updated
in interface Notifiable
updateFile
- The temporary file to replace the existing launcher jar
file. If null
the existing launcher jar will be
used again.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |