com.sun.ws.rest.spi.header
Class HeaderFactory

java.lang.Object
  extended by com.sun.ws.rest.spi.header.HeaderFactory

public final class HeaderFactory
extends java.lang.Object

Factory for getting HeaderProvider instances.


Constructor Summary
HeaderFactory()
           
 
Method Summary
static
<T> HeaderProvider<T>
getHeaderProvider(java.lang.Class<T> type)
          Get a HeaderProvider that supports the type (or Class) requested.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeaderFactory

public HeaderFactory()
Method Detail

getHeaderProvider

public static <T> HeaderProvider<T> getHeaderProvider(java.lang.Class<T> type)
                                           throws java.lang.IllegalArgumentException
Get a HeaderProvider that supports the type (or Class) requested.

The list of service-provider supporting the HeaderProvider service-provider will be iterated over until the first one supports the type is found.

Parameters:
type - the supporting type.
Returns:
the instance of HeaderProvider supporting the type.
Throws:
java.lang.IllegalArgumentException - if a header provider cannot be found for the supplied type