View Javadoc

1   /*
2    * $Id: AbstractMessageAwareTransformer.java 20320 2010-11-24 15:03:31Z dfeist $
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  
11  package org.mule.transformer;
12  
13  import org.mule.api.MuleMessage;
14  import org.mule.api.transformer.TransformerException;
15  
16  /**
17   * <code>AbstractMessageAwareTransformer</code> is the superclass for pre-MULE 3.0 message transformers.  Newly
18   * created message transformers should derive from AbstractMessageTransformer.
19   *
20   * @see AbstractMessageTransformer
21   */
22  @Deprecated
23  public abstract class AbstractMessageAwareTransformer extends AbstractMessageTransformer
24  {
25      /**
26       * Transform the message.
27       * @param message
28       * @param outputEncoding
29       * @return
30       * @throws TransformerException
31       */
32      @Override
33      public Object transformMessage(MuleMessage message, String outputEncoding) throws TransformerException
34      {
35          return transform(message, outputEncoding);
36      }
37  
38      /**
39       * Subclasses implement this method.
40       * @param message
41       * @param outputEncoding
42       * @return
43       * @throws TransformerException
44       */
45      public abstract Object transform(MuleMessage message, String outputEncoding) throws TransformerException;
46  
47  }