|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbiz.hammurapi.config.ComponentBase
biz.hammurapi.jms.adapter.converters.StylingXmlConverter
public abstract class StylingXmlConverter
This converter supports the following optional conversion properties:
resource:
then it is loaded from classloader resource.resource:
then it is loaded from classloader resource.resource:
then it is loaded from classloader resource.
Field Summary | |
---|---|
protected javax.xml.transform.TransformerFactory |
transformerFactory
|
Fields inherited from class biz.hammurapi.config.ComponentBase |
---|
owner |
Constructor Summary | |
---|---|
StylingXmlConverter()
|
Method Summary | |
---|---|
javax.jms.Message |
convert(java.lang.Exception ex,
javax.jms.Session session,
java.util.Map properties,
javax.jms.Message request)
This method supports error-style optional property - URL of stylesheet to apply after Exception -> Conversion. |
java.lang.Object |
convert(javax.jms.Message message,
java.util.Map properties)
This method supports from-xml-style optional property - URL of stylesheet to apply before XML -> Object conversion. |
protected abstract javax.xml.transform.Source |
convert(java.lang.Object request)
Converts request object to Source for styling/serialization |
javax.jms.Message |
convert(java.lang.Object obj,
javax.jms.Session session,
java.util.Map properties,
javax.jms.Message request)
This method supports to-xml-style optional property - URL of stylesheet to apply after Object -> XML conversion. |
protected org.w3c.dom.Document |
createDocument()
|
protected abstract javax.xml.transform.Result |
createResult()
Creates result to receive transformed input. |
protected javax.xml.transform.Transformer |
getTransformer(java.lang.String url)
|
protected abstract java.lang.Object |
processResult(javax.xml.transform.Result result)
Converts reply result to object. |
void |
start()
|
void |
stop()
|
Methods inherited from class biz.hammurapi.config.ComponentBase |
---|
addMeasurement, get, getChild, 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 |
---|
protected javax.xml.transform.TransformerFactory transformerFactory
Constructor Detail |
---|
public StylingXmlConverter()
Method Detail |
---|
protected org.w3c.dom.Document createDocument()
protected abstract javax.xml.transform.Result createResult()
protected abstract java.lang.Object processResult(javax.xml.transform.Result result) throws java.lang.Exception
result
-
java.lang.Exception
protected abstract javax.xml.transform.Source convert(java.lang.Object request) throws java.lang.Exception
request
-
java.lang.Exception
public void start() throws biz.hammurapi.config.ConfigurationException
start
in interface biz.hammurapi.config.Component
biz.hammurapi.config.ConfigurationException
protected javax.xml.transform.Transformer getTransformer(java.lang.String url) throws javax.xml.transform.TransformerConfigurationException, java.net.MalformedURLException, java.io.IOException
javax.xml.transform.TransformerConfigurationException
java.net.MalformedURLException
java.io.IOException
public java.lang.Object convert(javax.jms.Message message, java.util.Map properties) throws java.lang.Exception
from-xml-style
optional property - URL of stylesheet to apply before XML -> Object conversion.
If URL starts with resource:
then it is loaded from classloader resource.
convert
in interface Converter
message
- Source messageproperties
- Configuration properties
java.lang.Exception
public javax.jms.Message convert(java.lang.Object obj, javax.jms.Session session, java.util.Map properties, javax.jms.Message request) throws java.lang.Exception
to-xml-style
optional property - URL of stylesheet to apply after Object -> XML conversion.
If URL starts with resource:
then it is loaded from classloader resource.
Correlates by message ID.
convert
in interface Converter
obj
- Source objectsession
- Session to create messageproperties
- Configuration propertiesrequest
- Request message, can be null.
java.lang.Exception
public javax.jms.Message convert(java.lang.Exception ex, javax.jms.Session session, java.util.Map properties, javax.jms.Message request) throws java.lang.Exception
error-style
optional property - URL of stylesheet to apply after Exception -> Conversion.
If URL starts with resource:
then it is loaded from classloader resource.
This implementation uses ThrowableSerializer to convert exception to XML.
Correlates by message ID.
convert
in interface Converter
session
- Session to create messageproperties
- Configuration propertiesrequest
- Request message, can be null.
java.lang.Exception
public void stop() throws biz.hammurapi.config.ConfigurationException
stop
in interface biz.hammurapi.config.Component
biz.hammurapi.config.ConfigurationException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |