1 /* 2 * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com 3 * The software in this package is published under the terms of the CPAL v1.0 4 * license, a copy of which has been included with this distribution in the 5 * LICENSE.txt file. 6 */ 7 package org.mule.component.simple; 8 9 import org.mule.api.MuleEventContext; 10 import org.mule.api.component.simple.EchoService; 11 12 /** 13 * <code>EchoComponent</code> will log the message and return the payload back as 14 * the result. 15 */ 16 public class EchoComponent extends LogComponent implements EchoService 17 { 18 19 @Override 20 public Object onCall(MuleEventContext context) throws Exception 21 { 22 super.onCall(context); 23 return context.getMessage(); 24 } 25 26 public String echo(String echo) 27 { 28 return echo; 29 } 30 31 }