org.apache.tiles.request.servlet.extractor

## Class HeaderExtractor

- java.lang.Object
- - org.apache.tiles.request.servlet.extractor.HeaderExtractor

- All Implemented Interfaces:
    Addable<String>, EnumeratedValuesExtractor, HasAddableKeys<String>, HasKeys<String>

      public class HeaderExtractor
      extends Object
      implements EnumeratedValuesExtractor

  Extract header values from an HTTP request.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `HeaderExtractor(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Enumeration<String>` | `getKeys()` The enumeration of the keys of the stored attributes.
    `String` | `getValue(String key)` Returns the value of the attribute with the given key.
    `Enumeration<String>` | `getValues(String key)` Returns the values stored at the given key.
    `void` | `setValue(String key, String value)` Sets a value for the given key.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### HeaderExtractor

          public HeaderExtractor(javax.servlet.http.HttpServletRequest request,
                                 javax.servlet.http.HttpServletResponse response)

      Constructor.
      Parameters:
        `request` - The request.
        `response` - The response.

  - ### Method Detail

    - #### getKeys

          public Enumeration<String> getKeys()

      Description copied from interface: `HasKeys`
      The enumeration of the keys of the stored attributes.
      Specified by:
        `getKeys` in interface `HasKeys<String>`
      Returns:
        The keys.

    - #### getValue

          public String getValue(String key)

      Description copied from interface: `HasKeys`
      Returns the value of the attribute with the given key.
      Specified by:
        `getValue` in interface `HasKeys<String>`
      Parameters:
        `key` - The key of the attribute.
      Returns:
        The value.

    - #### getValues

          public Enumeration<String> getValues(String key)

      Description copied from interface: `EnumeratedValuesExtractor`
      Returns the values stored at the given key.
      Specified by:
        `getValues` in interface `EnumeratedValuesExtractor`
      Parameters:
        `key` - The key of the attribute.
      Returns:
        The values of the attribute.

    - #### setValue

          public void setValue(String key,
                               String value)

      Description copied from interface: `Addable`
      Sets a value for the given key.
      Specified by:
        `setValue` in interface `Addable<String>`
      Parameters:
        `key` - The key of the attribute.
        `value` - The value of the attribute.

Copyright © 2000–2024 Apache Software Foundation. All rights reserved.