Sonic ESB API

com.sonicsw.xq.service.xform
Class Xformer

java.lang.Object
  extended by com.sonicsw.xq.service.common.RulesProcessor
      extended by com.sonicsw.xq.service.xform.Xformer

public class Xformer
extends com.sonicsw.xq.service.common.RulesProcessor

Transformation processor.


Method Summary
 void init(XQParameters params, boolean isCacheEnabled)
          Initializes the "CBR" and "Xformer" objects that derive from the RulesProcessor, with the init params.
 void processRules(XQParameters runtimeParams)
          Processes the rule, for this service.
 
Methods inherited from class com.sonicsw.xq.service.common.RulesProcessor
clear, getInitRuleFile, setEnvelope, setMessage, setServiceContext
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

init

public void init(XQParameters params,
                 boolean isCacheEnabled)
          throws XQServiceException
Description copied from class: com.sonicsw.xq.service.common.RulesProcessor
Initializes the "CBR" and "Xformer" objects that derive from the RulesProcessor, with the init params. Reads the "ruleEvaluatorClassName", "ruleInfo" and "ruleFile" parameters, to initialize the ruleEvaluator object(aka ScriptEvaluator), with the ruleFile and helperFunction files info.

Overrides:
init in class com.sonicsw.xq.service.common.RulesProcessor
Parameters:
params - The init time parameters.
Throws:
XQServiceException

processRules

public void processRules(XQParameters runtimeParams)
                  throws XQServiceException
Description copied from class: com.sonicsw.xq.service.common.RulesProcessor
Processes the rule, for this service. Calls the private evaluate() method to evaluate the javascript rule which returns the result. Runtime rule if any overrides the init time rule. If the result is null, don't do anything to the message, just add it to the processedMsgs array that later gets added to the ServiceContext's OUTBOX. So messages for which the Javascript rule returns a "null" are put "untouched" in the OUTBOX of the ServiceContext. However, if the result from the Javascript rule is non-null, then call "processMessage" method in the derived classes "CBR" or "Xformer" to interpret the result and process the message accordingly. After the "processMessage" returns, it should have popuplated the "processedMsgs" array, which this method reads and copies to the OUTBOX of the ServiceContext.

Overrides:
processRules in class com.sonicsw.xq.service.common.RulesProcessor
Parameters:
runtimeParams - The runtime parameters.
Throws:
XQServiceException

Sonic ESB API

Copyright © 2001-2013 Aurea, Inc. All Rights Reserved.
HTML formatted on 29-April-2013.