|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.servlet.GenericServlet javax.servlet.http.HttpServlet org.ogf.graap.wsag.wsrf.bootstrap.Bootstrap
public class Bootstrap
This is essentially a copy of the Axis2 Servlet. It includes a patch in the initialization method to
prevent the registration of a shutdown hook by the ListenerManager (init(ServletConfig)
), which
causes a memory leak when re-deploying in tomcat.
When upgrading to a new version, this file MUST be upgraded too. (probably the shutdown hook can be
prevented in future by configuration)
Nested Class Summary | |
---|---|
protected class |
Bootstrap.RestRequestProcessor
Ues in processing REST related Requests. |
protected class |
Bootstrap.ServletRequestResponseTransport
|
Field Summary | |
---|---|
protected org.apache.axis2.transport.http.ListingAgent |
agent
The Listing Agent. |
protected org.apache.axis2.engine.AxisConfiguration |
axisConfiguration
Axis Configuration |
protected org.apache.axis2.context.ConfigurationContext |
configContext
Configuration Context |
static String |
CONFIGURATION_CONTEXT
Configuration Context |
protected String |
contextRoot
Context Root. |
protected boolean |
disableREST
disable REST |
protected javax.servlet.ServletConfig |
servletConfig
Servlet Configuration |
static String |
SESSION_ID
Session ID |
Constructor Summary | |
---|---|
Bootstrap()
|
Method Summary | |
---|---|
protected org.apache.axis2.context.MessageContext |
createMessageContext(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
This method assumes, that the created MessageContext will be used in only SOAP invocation. |
protected org.apache.axis2.context.MessageContext |
createMessageContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
boolean invocationType)
|
void |
destroy()
distroy the ConfigurationContext |
protected void |
doDelete(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Implementation of DELETE interface |
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Implementation for GET interface |
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Implementation of POST interface |
protected void |
doPut(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Implementation of PUT interface |
protected Map<?,?> |
getTransportHeaders(javax.servlet.http.HttpServletRequest req)
Get all transport headers. |
protected void |
handleFault(org.apache.axis2.context.MessageContext msgContext,
OutputStream out,
org.apache.axis2.AxisFault e)
|
void |
init()
Convenient method to re-initialize the ConfigurationContext |
void |
init(javax.servlet.ServletConfig config)
Main init method |
protected org.apache.axis2.context.ConfigurationContext |
initConfigContext(javax.servlet.ServletConfig config)
Initialize the Axis configuration context |
void |
initContextRoot(javax.servlet.http.HttpServletRequest req)
Set the context root if it is not set already. |
protected void |
initParams()
Initializes the Axis2 parameters. |
protected void |
showRestDisabledErrorMessage(javax.servlet.http.HttpServletResponse response)
Private method that deals with disabling of REST support. |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doHead, doOptions, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, 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 CONFIGURATION_CONTEXT
public static final String SESSION_ID
protected transient org.apache.axis2.context.ConfigurationContext configContext
protected transient org.apache.axis2.engine.AxisConfiguration axisConfiguration
protected transient javax.servlet.ServletConfig servletConfig
protected transient org.apache.axis2.transport.http.ListingAgent agent
protected transient String contextRoot
protected boolean disableREST
Constructor Detail |
---|
public Bootstrap()
Method Detail |
---|
protected void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doPost
in class javax.servlet.http.HttpServlet
request
- the requestresponse
- the response
javax.servlet.ServletException
- an servlet error
IOException
- an i/o errorprotected void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doGet
in class javax.servlet.http.HttpServlet
request
- the requestresponse
- the response
javax.servlet.ServletException
- an servlet error
IOException
- an i/o errorprotected void doDelete(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doDelete
in class javax.servlet.http.HttpServlet
request
- the requestresponse
- the response
javax.servlet.ServletException
- servlet error
IOException
- I/O errorprotected void doPut(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException, IOException
doPut
in class javax.servlet.http.HttpServlet
request
- the requestresponse
- the response
javax.servlet.ServletException
- an servlet error
IOException
- an i/o errorprotected void showRestDisabledErrorMessage(javax.servlet.http.HttpServletResponse response) throws IOException
response
- the response
IOException
- i/o exceptionprotected void handleFault(org.apache.axis2.context.MessageContext msgContext, OutputStream out, org.apache.axis2.AxisFault e) throws org.apache.axis2.AxisFault
msgContext
- the message contextout
- the response output streame
- the fault
org.apache.axis2.AxisFault
- AXIS faultpublic void init(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
init
in interface javax.servlet.Servlet
init
in class javax.servlet.GenericServlet
config
- the servlet config
javax.servlet.ServletException
- servlet exceptionpublic void destroy()
destroy
in interface javax.servlet.Servlet
destroy
in class javax.servlet.GenericServlet
protected void initParams()
public void init() throws javax.servlet.ServletException
init
in class javax.servlet.GenericServlet
javax.servlet.ServletException
- the errorprotected org.apache.axis2.context.ConfigurationContext initConfigContext(javax.servlet.ServletConfig config) throws javax.servlet.ServletException
config
- Servlet configuration
javax.servlet.ServletException
- a servlet exceptionpublic void initContextRoot(javax.servlet.http.HttpServletRequest req)
req
- the requestprotected Map<?,?> getTransportHeaders(javax.servlet.http.HttpServletRequest req)
req
- the request
protected org.apache.axis2.context.MessageContext createMessageContext(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, boolean invocationType) throws IOException
request
- the requestresponse
- the responseinvocationType
- If invocationType=true; then this will be used in SOAP message invocation. If
invocationType=false; then this will be used in REST message invocation.
IOException
- IO errorprotected org.apache.axis2.context.MessageContext createMessageContext(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws IOException
req
- the requestresp
- the response
IOException
- an IO error
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |