|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jboss.soa.esb.actions.converters.SmooksTransformer
public class SmooksTransformer
Smooks Transformer.
This processor hooks the Milyn Smooks XML Transformation/Processing Engine into a message processing pipeline to support non binary message transformations.<action name="transformAB" class="org.jboss.soa.esb.actions.converters.SmooksTransformer"> <property name="from" value="A" /> <property name="from-type" value="text/xml:messageAtA" /> <property name="to" value="B" /> <property name="to-type" value="text/xml:messageAtB" /> </action>
URIResourceLocator
.
The default list file is "classpath:/smooks-cdr.lst" (note classpath based URIs are supported).
This file contains a list of URIs that reference
Smooks resource configurations files.
Again, URIResourceLocator
is used to load these configurations. "classpath:/"
is the default if no scheme is specified. This is also where the Administration Console
is integrated with this class. The list file needs to specify the following a HTTP based
URI for accessing the configurations under management by the Administration console:
http://localhost:8080/jboss-esb-console/transform/smooks-config.jsp... where the host and port values need to be modified appropriately.
Field Summary | |
---|---|
static java.lang.String |
CONFIGURATION_SECTION
Configuration section key. |
static java.lang.String |
EXTRACTED_BEANS_HASH
Key for storing/accessing any potential message Body bean HashMaps as populated by the Smooks Javabean Cartridge. |
static java.lang.String |
FROM
|
static java.lang.String |
FROM_TYPE
|
static java.lang.String |
SET_BEANHASH_TO_PAYLOAD
Config property key for setting a true/false flag to indicate whether or not a bean hashs should be set as the message payload before exiting the process method. |
static java.lang.String |
TO
|
static java.lang.String |
TO_TYPE
|
Fields inherited from interface org.jboss.soa.esb.actions.ActionPipelineProcessor |
---|
PROCESS_EXCEPTION_METHOD, PROCESS_METHOD, PROCESS_SUCCESS_METHOD |
Constructor Summary | |
---|---|
SmooksTransformer(ConfigTree propertiesTree)
Public constructor. |
|
SmooksTransformer(java.lang.String name,
ConfigTree propertiesTree)
Public constructor. |
Method Summary | |
---|---|
void |
destroy()
Destroy the action instance. |
protected static java.lang.String[] |
getMessageUseragentProfiles(java.lang.String messageFromType,
java.lang.String messageFrom,
java.lang.String messageToType,
java.lang.String messageTo)
Get the profile list based on the supplied message flow properties. |
protected static java.lang.String |
getMessageUseragentString(java.lang.String messageFromType,
java.lang.String messageFrom,
java.lang.String messageToType,
java.lang.String messageTo)
Construct the Smooks useragent string based on the supplied message flow properties. |
void |
initialise()
Initialise the SmooksStandalone instance. |
Message |
process(Message message)
Perform the action processing on the specified message. |
void |
processException(Message message,
java.lang.Throwable th)
Process an exception generated by the pipeline processing. |
void |
processSuccess(Message message)
Process a successful pipeline process. |
void |
reset()
Reset the transformer. |
Message |
transform(Message message)
Transform the supplied message object and return the transformation result. |
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 CONFIGURATION_SECTION
public static final java.lang.String EXTRACTED_BEANS_HASH
public static final java.lang.String SET_BEANHASH_TO_PAYLOAD
public static final java.lang.String FROM
public static final java.lang.String FROM_TYPE
public static final java.lang.String TO
public static final java.lang.String TO_TYPE
Constructor Detail |
---|
public SmooksTransformer(java.lang.String name, ConfigTree propertiesTree) throws ConfigurationException
name
- Action name.propertiesTree
- Action Properties.
ConfigurationException
- Action not properly configured.public SmooksTransformer(ConfigTree propertiesTree) throws ConfigurationException
propertiesTree
- Action Properties.
ConfigurationException
ConfigurationException
- Action not properly configured.Method Detail |
---|
public Message transform(Message message) throws TransformationException
TransformationService
transform
in interface TransformationService
message
- The message to be transformed.
TransformationException
- An Exception occured during the transformation process.public Message process(Message message) throws ActionProcessingException
ActionPipelineProcessor
process
in interface ActionPipelineProcessor
message
- The current message being processed.
ActionProcessingException
- for errors during processing.protected static java.lang.String[] getMessageUseragentProfiles(java.lang.String messageFromType, java.lang.String messageFrom, java.lang.String messageToType, java.lang.String messageTo)
messageFromType
- The type string for the message source.messageFrom
- The Message Exchange Participant name for the message source.messageToType
- The type string for the message target.messageTo
- The Message Exchange Participant name for the message target.
protected static java.lang.String getMessageUseragentString(java.lang.String messageFromType, java.lang.String messageFrom, java.lang.String messageToType, java.lang.String messageTo)
messageFromType
- The type string for the message source.messageFrom
- The EPR string for the message source.messageToType
- The type string for the message target.messageTo
- The EPR srting for the message target.
public void processException(Message message, java.lang.Throwable th)
ActionPipelineProcessor
processException
in interface ActionPipelineProcessor
message
- The original message.th
- The throwable raised by the pipeline processingpublic void processSuccess(Message message)
ActionPipelineProcessor
processSuccess
in interface ActionPipelineProcessor
message
- The original message.public void initialise() throws ActionLifecycleException
initialise
in interface ActionLifecycle
ActionLifecycleException
- Failed to load Smooks configurations.public void destroy() throws ActionLifecycleException
ActionLifecycle
destroy
in interface ActionLifecycle
ActionLifecycleException
public void reset()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |