org.mule.transport.servlet
Class AbstractReceiverServlet
java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.mule.transport.servlet.AbstractReceiverServlet
- All Implemented Interfaces:
- Serializable, Servlet, ServletConfig
- Direct Known Subclasses:
- MuleReceiverServlet
public abstract class AbstractReceiverServlet
- extends HttpServlet
A base servlet used to receive requests from a servlet container and route
them into Mule
- See Also:
- Serialized Form
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected transient Log logger
- logger used by this class
REQUEST_TIMEOUT_PROPERTY
public static final String REQUEST_TIMEOUT_PROPERTY
- See Also:
- Constant Field Values
FEEDBACK_PROPERTY
public static final String FEEDBACK_PROPERTY
- See Also:
- Constant Field Values
DEFAULT_CONTENT_TYPE_PROPERTY
public static final String DEFAULT_CONTENT_TYPE_PROPERTY
- See Also:
- Constant Field Values
SERVLET_CONNECTOR_NAME_PROPERTY
@Deprecated
public static final String SERVLET_CONNECTOR_NAME_PROPERTY
- Deprecated. Use
MuleServletContextListener.CONNECTOR_NAME
instead- The name of the servlet connector to use with this Servlet
- See Also:
- Constant Field Values
PAYLOAD_PARAMETER_NAME
public static final String PAYLOAD_PARAMETER_NAME
- See Also:
- Constant Field Values
DEFAULT_PAYLOAD_PARAMETER_NAME
public static final String DEFAULT_PAYLOAD_PARAMETER_NAME
- See Also:
- Constant Field Values
DEFAULT_GET_TIMEOUT
public static final long DEFAULT_GET_TIMEOUT
- See Also:
- Constant Field Values
payloadParameterName
protected String payloadParameterName
timeout
protected long timeout
feedback
protected boolean feedback
defaultContentType
protected String defaultContentType
muleContext
protected MuleContext muleContext
AbstractReceiverServlet
public AbstractReceiverServlet()
init
public final void init()
throws ServletException
- Overrides:
init
in class GenericServlet
- Throws:
ServletException
setupMuleContext
protected MuleContext setupMuleContext()
throws ServletException
- Throws:
ServletException
setupResponseTransformer
protected void setupResponseTransformer()
throws ServletException
- Throws:
ServletException
doInit
protected void doInit()
throws ServletException
- Throws:
ServletException
writeResponse
protected void writeResponse(HttpServletResponse servletResponse,
MuleMessage message)
throws Exception
- Throws:
Exception
writeEmptyResponse
protected void writeEmptyResponse(HttpServletResponse servletResponse)
throws IOException
- Throws:
IOException
writeResponseFromMessage
protected void writeResponseFromMessage(HttpServletResponse servletResponse,
MuleMessage message)
throws Exception
- Throws:
Exception
convertToHttpResponse
protected HttpResponse convertToHttpResponse(MuleMessage message)
throws TransformerException
- Throws:
TransformerException
setHttpHeadersOnServletResponse
protected HttpServletResponse setHttpHeadersOnServletResponse(HttpResponse httpResponse,
HttpServletResponse servletResponse)
ensureContentTypeHeaderIsSet
protected void ensureContentTypeHeaderIsSet(HttpServletResponse servletResponse,
HttpResponse httpResponse)
contentTypeHeaderIsValid
protected boolean contentTypeHeaderIsValid(Header header)
handleException
protected void handleException(Throwable exception,
String message,
HttpServletResponse response)
writeErrorResponseFromMessage
protected void writeErrorResponseFromMessage(HttpServletResponse servletResponse,
MuleMessage message,
int errorCode,
String errorMessage)
throws Exception
- Throws:
Exception
Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.