biz.hammurapi.jms
Class StylingXmlMessageProcessor

java.lang.Object
  extended by biz.hammurapi.config.ComponentBase
      extended by biz.hammurapi.jms.MessageProcessor
          extended by biz.hammurapi.jms.StylingXmlMessageProcessor
All Implemented Interfaces:
biz.hammurapi.config.Component, biz.hammurapi.config.Context, biz.hammurapi.config.Restartable, biz.hammurapi.metrics.MeasurementCollector, biz.hammurapi.metrics.MeasurementConsumer
Direct Known Subclasses:
DomMessageProcessor, XmlBeansMessageProcessor

public class StylingXmlMessageProcessor
extends MessageProcessor

Author:
Tatyana Konukova

Field Summary
protected  javax.xml.transform.TransformerFactory transformerFactory
           
 
Fields inherited from class biz.hammurapi.jms.MessageProcessor
acknowledgeMode, connection, connectionFactory, initialContext, isTransacted, logger, restartCommand, worker
 
Fields inherited from class biz.hammurapi.config.ComponentBase
owner
 
Constructor Summary
StylingXmlMessageProcessor()
           
 
Method Summary
protected  javax.xml.transform.Result createResult()
          Creates result to receive transformed input.
protected  void processMessage(javax.jms.Message request, javax.jms.Session session)
          Parses request text, transforms and
protected  java.lang.String processResult(javax.xml.transform.Result result)
          Processes result.
 void setReplyDestination(java.lang.String destinationName)
          Front-end reply destination (queue or topic) name.
 void setStylesheet(java.lang.String stylesheet)
          Stylesheet URL.
 void start()
           
 
Methods inherited from class biz.hammurapi.jms.MessageProcessor
_processMessage, borrowSession, getChild, releaseSession, setAcknowledgeMode, setConnection, setConnectionFactory, setDestination, setInitialContext, setListeners, setLogger, setMessageSelector, setNoLocal, setPassword, setRestartCommand, setTransacted, setUser, setWorker, stop
 
Methods inherited from class biz.hammurapi.config.ComponentBase
addMeasurement, get, getMeasurementConsumer, getOwner, getOwner, setMeasurementConsumer, setOwner
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

transformerFactory

protected javax.xml.transform.TransformerFactory transformerFactory
Constructor Detail

StylingXmlMessageProcessor

public StylingXmlMessageProcessor()
Method Detail

createResult

protected javax.xml.transform.Result createResult()
Creates result to receive transformed input.

Returns:
Result instance.

processResult

protected java.lang.String processResult(javax.xml.transform.Result result)
Processes result. If this method return value is not null then it is sent to reply destination.

Parameters:
result -
Returns:

processMessage

protected void processMessage(javax.jms.Message request,
                              javax.jms.Session session)
Parses request text, transforms and

Specified by:
processMessage in class MessageProcessor
Parameters:
request - Request message
session - Session if message is processed in the message listener thread (worker is null or cannot process jobs), null otherwise.

setReplyDestination

public void setReplyDestination(java.lang.String destinationName)
Front-end reply destination (queue or topic) name.

Parameters:
destinationName -

setStylesheet

public void setStylesheet(java.lang.String stylesheet)
Stylesheet URL. If it starts with resource: then stylesheet gets loaded from classloader resource.

Parameters:
stylesheet -

start

public void start()
           throws biz.hammurapi.config.ConfigurationException
Specified by:
start in interface biz.hammurapi.config.Component
Overrides:
start in class MessageProcessor
Throws:
biz.hammurapi.config.ConfigurationException


Copyright © 2006 Hammurapi Group. All Rights Reserved.