RewriteAction action1 = new RewriteAction();
action1.setValue("localhost");
action1.setFragmentIndex(URIFragments.HOST);
RewriteRule rule1 = new RewriteRule();
rule1.addRewriteAction(action1);
EqualEvaluator eval1 = new EqualEvaluator();
URLTextRetriever txtRtvr1 = new URLTextRetriever();
txtRtvr1.setSource(EvaluatorConstants.URI_FRAGMENTS.host.name());
eval1.setTextRetriever(txtRtvr1);
eval1.setValue("myhost");
rule1.setCondition(eval1);
mediator.addRule(rule1);
RewriteAction action2 = new RewriteAction();
action2.setValue("/services/SimpleStockQuoteService");