View Javadoc

    1   package org.apache.turbine.services.rundata;
    2
    3   /*
    4    * Licensed to the Apache Software Foundation (ASF) under one
    5    * or more contributor license agreements.  See the NOTICE file
    6    * distributed with this work for additional information
    7    * regarding copyright ownership.  The ASF licenses this file
    8    * to you under the Apache License, Version 2.0 (the
    9    * "License"); you may not use this file except in compliance
    10   * with the License.  You may obtain a copy of the License at
    11   *
    12   *   http://www.apache.org/licenses/LICENSE-2.0
    13   *
    14   * Unless required by applicable law or agreed to in writing,
    15   * software distributed under the License is distributed on an
    16   * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    17   * KIND, either express or implied.  See the License for the
    18   * specific language governing permissions and limitations
    19   * under the License.
    20   */
    21
    22  import javax.servlet.ServletConfig;
    23  import javax.servlet.http.HttpServletRequest;
    24  import javax.servlet.http.HttpServletResponse;
    25
    26  import org.apache.fulcrum.parser.CookieParser;
    27  import org.apache.fulcrum.parser.ParameterParser;
    28  import org.apache.fulcrum.pool.Recyclable;
    29  import org.apache.turbine.util.RunData;
    30  import org.apache.turbine.util.ServerData;
    31
    32  /**
    33   * TurbineRunData is an extension to the RunData interface to be
    34   * implemented by RunData implementations to be distributed by
    35   * the Turbine RunData Service. The extensions define methods
    36   * that are used by the service for initilizing the implementation,
    37   * but which are not meant to be called by the actual client objects.
    38   *
    39   * <p>TurbineRunData extends also the Recyclable interface making
    40   * it possible to pool its implementations for recycling.
    41   *
    42   * @author <a href="mailto:ilkka.priha@simsoft.fi">Ilkka Priha</a>
    43   * @author <a href="mailto:jon@latchkey.com">Jon S. Stevens</a>
    44   * @author <a href="mailto:bhoeneis@ee.ethz.ch">Bernie Hoeneisen</a>
    45   * @author <a href="mailto:dlr@finemaltcoding.com">Daniel Rall</a>
    46   * @author <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a>
    47   * @version $Id: TurbineRunData.java 1066938 2011-02-03 20:14:53Z ludwig $
    48   */
    49  public interface TurbineRunData
    50      extends RunData,
    51              Recyclable
    52  {
    53      /**
    54       * Gets the parameter parser without parsing the parameters.
    55       *
    56       * @return the parameter parser.
    57       */
    58      ParameterParser getParameterParser();
    59
    60      /**
    61       * Sets the parameter parser.
    62       *
    63       * @param parser a parameter parser.
    64       */
    65      void setParameterParser(ParameterParser parser);
    66
    67      /**
    68       * Gets the cookie parser without parsing the cookies.
    69       *
    70       * @return the cookie parser.
    71       */
    72      CookieParser getCookieParser();
    73
    74      /**
    75       * Sets the cookie parser.
    76       *
    77       * @param parser a cookie parser.
    78       */
    79      void setCookieParser(CookieParser parser);
    80
    81      /**
    82       * Sets the servlet request.
    83       *
    84       * @param req a request.
    85       */
    86      void setRequest(HttpServletRequest req);
    87
    88      /**
    89       * Sets the servlet response.
    90       *
    91       * @param res a response.
    92       */
    93      void setResponse(HttpServletResponse res);
    94
    95      /**
    96       * Sets the servlet configuration used during servlet init.
    97       *
    98       * @param config a configuration.
    99       */
    100     void setServletConfig(ServletConfig config);
    101
    102     /**
    103      * Sets the server data of the request.
    104      *
    105      * @param serverData server data.
    106      */
    107     void setServerData(ServerData serverData);
    108 }