|
||||||||||
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.apache.activemq.web.MessageServletSupport
org.apache.activemq.web.MessageServlet
public class MessageServlet
A servlet for sending and receiving messages to/from JMS destinations using HTTP POST for sending and HTTP GET for receiving.
You can specify the destination and whether it is a topic or queue via configuration details on the servlet or as request parameters. For reading messages you can specify a readTimeout parameter to determine how long the servlet should block for.
Constructor Summary | |
---|---|
MessageServlet()
|
Method Summary | |
---|---|
protected void |
doDelete(HttpServletRequest request,
HttpServletResponse response)
Supports a HTTP DELETE to be equivlanent of consuming a singe message from a queue |
protected void |
doGet(HttpServletRequest request,
HttpServletResponse response)
Supports a HTTP DELETE to be equivlanent of consuming a singe message from a queue |
protected void |
doMessages(HttpServletRequest request,
HttpServletResponse response,
int maxMessages)
Reads a message from a destination up to some specific timeout period |
protected void |
doMessagesWithoutContinuation(HttpServletRequest request,
HttpServletResponse response,
int maxMessages)
Reads a message from a destination up to some specific timeout period |
protected void |
doPost(HttpServletRequest request,
HttpServletResponse response)
Sends a message to a destination |
protected String |
getContentType(HttpServletRequest request)
|
protected long |
getReadTimeout(HttpServletRequest request)
|
WebClient |
getWebClient(HttpServletRequest request)
|
void |
init()
|
protected boolean |
isRicoAjax(HttpServletRequest request)
|
protected void |
setResponseHeaders(HttpServletResponse response,
Message message)
|
protected void |
writeMessageResponse(PrintWriter writer,
Message message)
|
Methods inherited from class org.apache.activemq.web.MessageServletSupport |
---|
appendParametersToMessage, asBoolean, asBoolean, asDestination, asInt, asInteger, asLong, asLong, asString, getDestination, getDestination, getDestinationFromURI, getPostedMessageBody, getSendPriority, getSendTimeToLive, init, isSendPersistent, isSync, isTopic |
Methods inherited from class javax.servlet.http.HttpServlet |
---|
doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
---|
destroy, 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 |
Constructor Detail |
---|
public MessageServlet()
Method Detail |
---|
public void init() throws ServletException
init
in class GenericServlet
ServletException
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
doPost
in class HttpServlet
request
- response
-
ServletException
IOException
protected void doDelete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
doDelete
in class HttpServlet
ServletException
IOException
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
doGet
in class HttpServlet
ServletException
IOException
protected void doMessages(HttpServletRequest request, HttpServletResponse response, int maxMessages) throws ServletException, IOException
request
- response
-
ServletException
IOException
protected void doMessagesWithoutContinuation(HttpServletRequest request, HttpServletResponse response, int maxMessages) throws ServletException, IOException
request
- response
-
ServletException
IOException
protected void writeMessageResponse(PrintWriter writer, Message message) throws JMSException, IOException
JMSException
IOException
protected boolean isRicoAjax(HttpServletRequest request)
public WebClient getWebClient(HttpServletRequest request)
protected String getContentType(HttpServletRequest request)
protected void setResponseHeaders(HttpServletResponse response, Message message) throws JMSException
JMSException
protected long getReadTimeout(HttpServletRequest request)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |