View Javadoc

1   /*
2    * $Id: BaseTransformer.java 10489 2008-01-23 17:53:38Z dfeist $
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  package org.mule.api.transformer;
11  
12  import org.mule.api.NamedObject;
13  import org.mule.api.endpoint.ImmutableEndpoint;
14  import org.mule.api.lifecycle.Initialisable;
15  
16  /**
17   * <code>Transformer</code> can be chained together to covert message payloads from one
18   * object type to another.
19  
20   */
21  public interface BaseTransformer extends Initialisable, NamedObject
22  {
23      /**
24       * The endpoint that this transformer is attached to
25       * @return the endpoint associated with the transformer
26       */
27      ImmutableEndpoint getEndpoint();
28  
29      /**
30       * Sets the endpoint associated with with this connector.
31       * This should be idempotent, since endpoints do not guarantee it will only
32       * be called once.
33       * @param endpoint sets the endpoint associated with the transfromer
34       */
35      void setEndpoint(ImmutableEndpoint endpoint);
36  
37  }