javax.ws.rs.ext

## Interface RuntimeDelegate.HeaderDelegate<T>

- Type Parameters:
    `T` - a JAX-RS type that corresponds to the value of a HTTP header.
  All Known Implementing Classes:
    CacheControlDelegate, CookieHeaderDelegate, DateDelegate, EntityTagDelegate, LinkDelegate, LinkHeaderDelegate, LocaleDelegate, MediaTypeHeaderDelegate, NewCookieHeaderDelegate, UriHeaderDelegate
  Enclosing class:
    RuntimeDelegate

      public static interface RuntimeDelegate.HeaderDelegate<T>

  Defines the contract for a delegate that is responsible for converting between the String form of a HTTP header and the corresponding JAX-RS type `T`.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `T` | `fromString(String value)` Parse the supplied value and create an instance of `T`.
    `String` | `toString(T value)` Convert the supplied value to a String.

- - ### Method Detail

    - #### fromString

          T fromString(String value)

      Parse the supplied value and create an instance of `T`.
      Parameters:
        `value` - the string value.
      Returns:
        the newly created instance of `T`.
      Throws:
        `IllegalArgumentException` - if the supplied string cannot be parsed or is `null`.

    - #### toString

          String toString(T value)

      Convert the supplied value to a String.
      Parameters:
        `value` - the value of type `T`.
      Returns:
        a String representation of the value.
      Throws:
        `IllegalArgumentException` - if the supplied object cannot be serialized or is `null`.

Copyright © 2014. All Rights Reserved.