Loading...

Open-Source ESBs in Action: Example Implementations in Mule and ServiceMix by Tijs Rademakers Jos Dirksen

Open-Source ESBs in Action: Example Implementations in Mule and ServiceMix by Tijs Rademakers Jos Dirksen

Author:Tijs Rademakers, Jos Dirksen
Language: eng
Format: epub
Publisher: Manning Publications


Listing 6.39. Transformer that transforms a string to a SearchQuery object

In listing 6.39 we specify the expected input type, a String , and the expected output type, a SearchQuery , for this transformer. Mule will check whether the transformer is called with the correct source object and will also check whether the result from the transformer is of the type we specified. Adding these checks isn’t necessary but will make our transformers more robust and will allow us to catch any problems immediately. The doTransform method performs the actual transformation by simply splitting the incoming String object and creating a new SearchQuery based on the resulting string array . This SearchQuery is returned from this transformer and passed back to Mule.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.