1 /* 2 * $Id: PayloadAnnotationComponent.java 19191 2010-08-25 21:05:23Z tcarlson $ 3 * -------------------------------------------------------------------------------------- 4 * Copyright (c) MuleSoft, Inc. All rights reserved. http://www.mulesoft.com 5 * 6 * The software in this package is published under the terms of the CPAL v1.0 7 * license, a copy of which has been included with this distribution in the 8 * LICENSE.txt file. 9 */ 10 package org.mule.api.annotations.param; 11 12 import java.io.InputStream; 13 14 /** 15 * Test cases where the Payload annotation can be used to specify the parameter to inject the payload of the message, including 16 * doing automatic transforms 17 */ 18 public class PayloadAnnotationComponent 19 { 20 //No transform needed 21 public String processNoTransformString(@Payload String payload) 22 { 23 return payload; 24 } 25 26 //Auto transform from String to InputStream 27 public InputStream processAutoTransformString(@Payload InputStream payload) 28 { 29 return payload; 30 } 31 32 //There is no transformer to go from String to StringBuffer 33 public Object processFailedAutoTransformString(@Payload StringBuffer payload) 34 { 35 return payload; 36 } 37 }