View Javadoc

    1   package org.apache.turbine.pipeline;
    2
    3   import java.util.Map;
    4
    5
    6   /*
    7    * Licensed to the Apache Software Foundation (ASF) under one
    8    * or more contributor license agreements.  See the NOTICE file
    9    * distributed with this work for additional information
    10   * regarding copyright ownership.  The ASF licenses this file
    11   * to you under the Apache License, Version 2.0 (the
    12   * "License"); you may not use this file except in compliance
    13   * with the License.  You may obtain a copy of the License at
    14   *
    15   *   http://www.apache.org/licenses/LICENSE-2.0
    16   *
    17   * Unless required by applicable law or agreed to in writing,
    18   * software distributed under the License is distributed on an
    19   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    20   * KIND, either express or implied.  See the License for the
    21   * specific language governing permissions and limitations
    22   * under the License.
    23   */
    24
    25
    26  /**
    27   * <p>A <b>PipelineData</b> is a holder for data being passed from one
    28   * Valve to the next.
    29   * The detailed contract for a Valve is included in the description of
    30   * the <code>invoke()</code> method below.</p>
    31   *
    32   * <b>HISTORICAL NOTE</b>:  The "PipelineData" name was assigned to this
    33   * holder as it functions similarly to the RunData object, but without
    34   * the additional methods
    35   *
    36   * @author <a href="mailto:epugh@opensourceconnections.com">Eric Pugh</a>
    37   * @author <a href="mailto:peter@courcoux.biz">Peter Courcoux</a>
    38   */
    39  public interface PipelineData
    40  {
    41      /**
    42       * Put a configured map of objects into the pipeline data object
    43       *
    44       * @param name the key class
    45       * @param value the value map
    46       */
    47      public void put(Class<?> name, Map<Class<?>, ? super Object> value);
    48
    49      /**
    50       * Get the configured map of objects for the given key
    51       *
    52       * @param name the key class
    53       * @return the value map or null if no such key exists
    54       */
    55      public Map<Class<?>, ? super Object> get(Class<?> name);
    56
    57      /**
    58       * Get a value from the configured map of objects for the given keys
    59       *
    60       * @param key the key class
    61       * @param innerKey the key into the value map
    62       * @return the inner value or null if no such keys exist
    63       */
    64      public <T> T get(Class<?> key, Class<T> innerKey);
    65  }