|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.ws.rs.client.Entity<T>
T - entity type.public final class Entity<T>
Encapsulates message entity including the associated variant information.
| Method Summary | ||
|---|---|---|
static
|
entity(T entity,
MediaType mediaType)
Create an entity using a supplied content media type. |
|
static
|
entity(T entity,
MediaType mediaType,
Annotation[] annotations)
Create an entity using a supplied content media type. |
|
static
|
entity(T entity,
String mediaType)
Create an entity using a supplied content media type. |
|
static
|
entity(T entity,
Variant variant)
Create an entity using a supplied content media type. |
|
static
|
entity(T entity,
Variant variant,
Annotation[] annotations)
Create an entity using a supplied content media type. |
|
static Entity<Form> |
form(Form form)
Create an "application/x-www-form-urlencoded" form entity. |
|
static Entity<Form> |
form(MultivaluedMap<String,String> formData)
Create an "application/x-www-form-urlencoded" form entity. |
|
Annotation[] |
getAnnotations()
Get the entity annotations. |
|
String |
getEncoding()
Get entity encoding. |
|
T |
getEntity()
Get entity data. |
|
Locale |
getLanguage()
Get entity language. |
|
MediaType |
getMediaType()
Get entity media type. |
|
Variant |
getVariant()
Get entity variant information. |
|
static
|
html(T entity)
Create a "text/html" entity. |
|
static
|
json(T entity)
Create an "application/json" entity. |
|
static
|
text(T entity)
Create a "text/plain" entity. |
|
static
|
xhtml(T entity)
Create an "application/xhtml+xml" entity. |
|
static
|
xml(T entity)
Create an "application/xml" entity. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> Entity<T> entity(T entity,
MediaType mediaType)
T - entity Java type.entity - entity data.mediaType - entity content type.
public static <T> Entity<T> entity(T entity,
MediaType mediaType,
Annotation[] annotations)
T - entity Java type.entity - entity data.mediaType - entity content type.annotations - entity annotations.
public static <T> Entity<T> entity(T entity,
String mediaType)
T - entity Java type.entity - entity data.mediaType - entity content type.
IllegalArgumentException - if the supplied string cannot be parsed
or is null.
public static <T> Entity<T> entity(T entity,
Variant variant)
T - entity Java type.entity - entity data.variant - entity variant information.
public static <T> Entity<T> entity(T entity,
Variant variant,
Annotation[] annotations)
T - entity Java type.entity - entity data.variant - entity variant information.annotations - entity annotations.
public static <T> Entity<T> text(T entity)
T - entity Java type.entity - entity data.
public static <T> Entity<T> xml(T entity)
T - entity Java type.entity - entity data.
public static <T> Entity<T> json(T entity)
T - entity Java type.entity - entity data.
public static <T> Entity<T> html(T entity)
T - entity Java type.entity - entity data.
public static <T> Entity<T> xhtml(T entity)
T - entity Java type.entity - entity data.
public static Entity<Form> form(Form form)
form - form data.
public static Entity<Form> form(MultivaluedMap<String,String> formData)
formData - multivalued map representing the form data.
public Variant getVariant()
variant information.
public MediaType getMediaType()
public String getEncoding()
public Locale getLanguage()
public T getEntity()
public Annotation[] getAnnotations()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||