org.apache.clerezza.triaxrs.util
Class AcceptHeader

java.lang.Object
  extended by org.apache.clerezza.triaxrs.util.AcceptHeader

public class AcceptHeader
extends Object

Author:
reto

Constructor Summary
AcceptHeader(List<String> entryStrings)
           
 
Method Summary
 int getAcceptedQuality(javax.ws.rs.core.MediaType type)
           
 Set<javax.ws.rs.core.MediaType> getAcceptingMediaType(javax.ws.rs.core.MediaType type)
           
 List<javax.ws.rs.core.MediaType> getEntries()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AcceptHeader

public AcceptHeader(List<String> entryStrings)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getEntries

public List<javax.ws.rs.core.MediaType> getEntries()
Returns:
a sorted list of the Mediatypes

getAcceptedQuality

public int getAcceptedQuality(javax.ws.rs.core.MediaType type)
Parameters:
type -
Returns:
a value from 0 to 1000 to indicate the quality in which type is accepted

getAcceptingMediaType

public Set<javax.ws.rs.core.MediaType> getAcceptingMediaType(javax.ws.rs.core.MediaType type)
Parameters:
type -
Returns:
the media-types in the accept header that are would best accept type, i.e. all pattern with the highest same q-value accepting type are returned


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.