|
Jumpi v1.2.0 | |||||||||
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.jumpi.impl.servlet.jmsbridge.HttpJmsBridgeServlet
A HTTP to JMS Bridge Servlet. HTTP requests are converted into JMS requests and the synchronous reply to the JMS requests are returned as the HTTP synchronous response. The Servlet handles both HTTP GET and POST requests. The HTTP request content type must be 'application/x-www-form-urlencoded' or 'plain/text' where each line donates a new key or value. HTTP request parameters and values form a Hashtable of key value pairs which are sent via Jumpi. The parameter 'jms.queue.name' provided by the HTTP requestor is used as the Destination Queue for the request. This enables a calling client to determine the queue for sending the request to dynamically. Backend services can be provided on different JMS Queues. The JMS response expected is a also a Hashtable of key-value String pairs. The response is provided as a HTTP plain text response, where each key and value are line separated.
Field Summary | |
static java.lang.String |
PROPERTY_APPLICATION_CLASSNAME
The property indicating the classname of embedded applications. |
static java.lang.String |
PROPERTY_CACHE_GET_TIMEOUT
The maximum time in millis that a servlet Thread will wait to get a Jumpi instance to use for the request from the cache. |
static java.lang.String |
PROPERTY_CACHE_SIZE
The number of concurrent Jumpi instances availible to servlet Threads. |
static java.lang.String |
PROPERTY_DEBUG
The property indicating whether to provide debug output. |
static java.lang.String |
PROPERTY_JMS_QUEUE_NAME
The property indicating which JMS queue to use for the request. |
static java.lang.String |
PROPERTY_JMS_TTL
The property indicating how long the TTL of the request is. |
Constructor Summary | |
HttpJmsBridgeServlet()
|
Method Summary | |
void |
doGet(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Service a HTTP GET request. |
void |
doPost(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Service a HTTP POST request. |
protected void |
doWork(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Service either a HTTP GET or POST request. |
Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPut, doTrace, getLastModified, service, service |
Methods inherited from class javax.servlet.GenericServlet |
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, 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 java.lang.String PROPERTY_CACHE_SIZE
public static final java.lang.String PROPERTY_CACHE_GET_TIMEOUT
public static final java.lang.String PROPERTY_JMS_QUEUE_NAME
public static final java.lang.String PROPERTY_JMS_TTL
public static final java.lang.String PROPERTY_APPLICATION_CLASSNAME
public static final java.lang.String PROPERTY_DEBUG
Constructor Detail |
public HttpJmsBridgeServlet()
Method Detail |
public void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
doGet
in class javax.servlet.http.HttpServlet
request
- the HTTP request.response
- the HTTP response.
java.io.IOException
- if any IO related failure occurs.
javax.servlet.ServletException
- if any failure condition occurs.doWork(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
public void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
doPost
in class javax.servlet.http.HttpServlet
request
- the HTTP request.response
- the HTTP response.
java.io.IOException
- if any IO related failure occurs.
javax.servlet.ServletException
- if any failure condition occurs.doWork(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
protected void doWork(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException
Service either a HTTP GET or POST request. Any parameters are decoded into a Hashtable and sent via Jumpi's JMS to a JMS replyer-like replyer application. The response is synchronously received and the response Hashtable's key-value pairs are provided in the response as line separated plain text.
A cache of Jumpi instances is established on the first call.
request
- the HTTP request.response
- the HTTP response.
java.io.IOException
- if any IO related failure occurs.
javax.servlet.ServletException
- if any failure condition occurs.
|
Jumpi v1.2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |