View Javadoc

1   /*
2    * $Id: AbstractCompressionTransformer.java 7976 2007-08-21 14:26:13Z dirk.olmes $
3    * --------------------------------------------------------------------------------------
4    * Copyright (c) MuleSource, Inc.  All rights reserved.  http://www.mulesource.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.transformers.compression;
12  
13  import org.mule.transformers.AbstractTransformer;
14  import org.mule.util.compression.CompressionStrategy;
15  
16  /**
17   * <code>AbstractCompressionTransformer</code> is a base class for all transformers
18   * that can compress or uncompress data when they performa message transformation.
19   * Compression is done via a pluggable strategy.
20   */
21  
22  public abstract class AbstractCompressionTransformer extends AbstractTransformer
23  {
24      private CompressionStrategy strategy;
25  
26      /**
27       * default constructor required for discovery
28       */
29      public AbstractCompressionTransformer()
30      {
31          super();
32      }
33  
34      public CompressionStrategy getStrategy()
35      {
36          return strategy;
37      }
38  
39      public void setStrategy(CompressionStrategy strategy)
40      {
41          this.strategy = strategy;
42      }
43  
44  }