|
||||||||||
| 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(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Supports a HTTP DELETE to be equivlanent of consuming a singe message from a queue |
protected void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Supports a HTTP DELETE to be equivlanent of consuming a singe message from a queue |
protected void |
doMessages(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
int maxMessages)
Reads a message from a destination up to some specific timeout period |
protected void |
doMessagesWithoutContinuation(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
int maxMessages)
Reads a message from a destination up to some specific timeout period |
protected void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Sends a message to a destination |
protected java.lang.String |
getContentType(javax.servlet.http.HttpServletRequest request)
|
protected long |
getReadTimeout(javax.servlet.http.HttpServletRequest request)
|
void |
init()
|
protected boolean |
isRicoAjax(javax.servlet.http.HttpServletRequest request)
|
protected void |
setResponseHeaders(javax.servlet.http.HttpServletResponse response,
javax.jms.Message message)
|
protected void |
writeMessageResponse(java.io.PrintWriter writer,
javax.jms.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, 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 javax.servlet.ServletException
init in class javax.servlet.GenericServletjavax.servlet.ServletException
protected void doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
doPost in class javax.servlet.http.HttpServletrequest - response -
javax.servlet.ServletException
java.io.IOException
protected void doDelete(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
doDelete in class javax.servlet.http.HttpServletjavax.servlet.ServletException
java.io.IOException
protected void doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws javax.servlet.ServletException,
java.io.IOException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletException
java.io.IOException
protected void doMessages(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
int maxMessages)
throws javax.servlet.ServletException,
java.io.IOException
request - response -
javax.servlet.ServletException
java.io.IOException
protected void doMessagesWithoutContinuation(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
int maxMessages)
throws javax.servlet.ServletException,
java.io.IOException
request - response -
javax.servlet.ServletException
java.io.IOException
protected void writeMessageResponse(java.io.PrintWriter writer,
javax.jms.Message message)
throws javax.jms.JMSException,
java.io.IOException
javax.jms.JMSException
java.io.IOExceptionprotected boolean isRicoAjax(javax.servlet.http.HttpServletRequest request)
protected java.lang.String getContentType(javax.servlet.http.HttpServletRequest request)
protected void setResponseHeaders(javax.servlet.http.HttpServletResponse response,
javax.jms.Message message)
throws javax.jms.JMSException
javax.jms.JMSExceptionprotected long getReadTimeout(javax.servlet.http.HttpServletRequest request)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||