org.apache.commons.messagelet.impl
Class MessageHttpServletDispatcher

java.lang.Object
  extended byorg.apache.commons.messagelet.MessageDrivenObjectSupport
      extended byorg.apache.commons.messagelet.impl.MessageHttpServletDispatcher
All Implemented Interfaces:
MessageDrivenObject, javax.jms.MessageListener, MessengerListener

public class MessageHttpServletDispatcher
extends MessageDrivenObjectSupport
implements MessengerListener

MessageHttpServletDispatcher dispatches JMS Messages into a HttpServlet for procesing.

Version:
$Revision: 1.3 $
Author:
James Strachan

Field Summary
private  Messenger messenger
          The reply to messenger
private  java.lang.String path
          Holds value of property path.
private  HttpMessageletRequestImpl request
          The HttpServletRequest object we will pass to the servlet engine
private  HttpMessageletResponseImpl response
          The HttpServletResponse object we will pass to the servlet engine
 
Fields inherited from class org.apache.commons.messagelet.MessageDrivenObjectSupport
 
Constructor Summary
MessageHttpServletDispatcher()
           
MessageHttpServletDispatcher(java.lang.String path)
           
 
Method Summary
protected  HttpServletRequestImpl createHttpServletRequest()
           
 java.lang.String getPath()
          Getter for property path.
protected  void handleException(javax.jms.Message message, java.lang.Throwable t)
           
 void init()
          This method allows the init() method to be overriden without having to call the super.init( ServletContext ) method first.
 void onMessage(javax.jms.Message message)
          Process the incoming JMS Message.
 void setMessenger(Messenger messenger)
          Called whenever this MessageListener is added to a Messenger via the addListener() method to associate this MessageListener with a Messenger instance..
 void setPath(java.lang.String path)
          Setter for property path.
 
Methods inherited from class org.apache.commons.messagelet.MessageDrivenObjectSupport
destroy, getLog, getServletContext, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

request

private HttpMessageletRequestImpl request
The HttpServletRequest object we will pass to the servlet engine


response

private HttpMessageletResponseImpl response
The HttpServletResponse object we will pass to the servlet engine


messenger

private Messenger messenger
The reply to messenger


path

private java.lang.String path
Holds value of property path.

Constructor Detail

MessageHttpServletDispatcher

public MessageHttpServletDispatcher()

MessageHttpServletDispatcher

public MessageHttpServletDispatcher(java.lang.String path)
Method Detail

init

public void init()
          throws javax.servlet.ServletException
Description copied from class: MessageDrivenObjectSupport
This method allows the init() method to be overriden without having to call the super.init( ServletContext ) method first. This is similar to the init() method in GenericServlet.

Overrides:
init in class MessageDrivenObjectSupport
Throws:
javax.servlet.ServletException

setMessenger

public void setMessenger(Messenger messenger)
Description copied from interface: MessengerListener
Called whenever this MessageListener is added to a Messenger via the addListener() method to associate this MessageListener with a Messenger instance..

Specified by:
setMessenger in interface MessengerListener

onMessage

public void onMessage(javax.jms.Message message)
Process the incoming JMS Message.

Specified by:
onMessage in interface javax.jms.MessageListener
Parameters:
message - is the message to be processed

getPath

public java.lang.String getPath()
Getter for property path.

Returns:
Value of property path.

setPath

public void setPath(java.lang.String path)
Setter for property path.

Parameters:
path - New value of property path.

handleException

protected void handleException(javax.jms.Message message,
                               java.lang.Throwable t)

createHttpServletRequest

protected HttpServletRequestImpl createHttpServletRequest()