javax.ws.rs.client
Class Entity<T>

java.lang.Object
  extended by javax.ws.rs.client.Entity<T>
Type Parameters:
T - entity type.

public class Entity<T>
extends Object

Encapsulates message entity including the associated variant information.

Author:
Marek Potociar

Method Summary
static
<T> Entity<T>
entity(T entity, MediaType mediaType)
           
static
<T> Entity<T>
entity(T entity, String mediaType)
           
static
<T> Entity<T>
entity(T entity, Variant variant)
           
static Entity<Form> form(Form form)
           
static Entity<Form> form(MultivaluedMap<String,String> formData)
           
 String getEncoding()
           
 T getEntity()
           
 Locale getLanguage()
           
 MediaType getMediaType()
           
 Variant getVariant()
           
static
<T> Entity<T>
html(T entity)
           
static
<T> Entity<T>
json(T entity)
           
static
<T> Entity<T>
text(T entity)
           
static
<T> Entity<T>
xhtml(T entity)
           
static
<T> Entity<T>
xml(T entity)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

entity

public static <T> Entity<T> entity(T entity,
                                   MediaType mediaType)

entity

public static <T> Entity<T> entity(T entity,
                                   String mediaType)
                        throws IllegalStateException
Throws:
IllegalStateException

entity

public static <T> Entity<T> entity(T entity,
                                   Variant variant)
                        throws IllegalStateException
Throws:
IllegalStateException

text

public static <T> Entity<T> text(T entity)

xml

public static <T> Entity<T> xml(T entity)

json

public static <T> Entity<T> json(T entity)

html

public static <T> Entity<T> html(T entity)

xhtml

public static <T> Entity<T> xhtml(T entity)

form

public static Entity<Form> form(Form form)

form

public static Entity<Form> form(MultivaluedMap<String,String> formData)

getVariant

public Variant getVariant()

getMediaType

public MediaType getMediaType()

getEncoding

public String getEncoding()

getLanguage

public Locale getLanguage()

getEntity

public T getEntity()


Copyright © 2007-2012 Oracle Corporation. All Rights Reserved. Use is subject to license terms.