Sun GlassFish Mobility Platform 1.1 Developer's Guide for Client Applications

The UniformInterface Interface

Table 5–2 lists the methods in the UniformInterface interface, which is implemented by the WebResource class.

These methods throw a UniformInterfaceException (see The UniformInterfaceException Class).

Table 5–2 Interface com.sun.jerseyme.api.client.UniformInterface

Method 

Description 

UniformInterface accept(java.lang.String type)

Sets an Accept HTTP header. 

UniformInterface acceptLanguage(java.lang.String type)

Sets an Accept-Language HTTP header. 

UniformInterface cookie(java.lang.String type)

Sets a Cookie HTTP header. 

void delete()

Invokes the DELETE method with no request entity or response. May use X-HTTP-Method-Override if HTTP DELETE is not supported. 

java.lang.Object delete(java.lang.Class c)

Invokes the DELETE method with no request entity that returns a response. May use X-HTTP-Method-Override if HTTP DELETE is not supported. 

java.lang.Object delete(java.lang.Class c, java.lang.Object o)

Invokes the DELETE method with a request entity that returns a response. May use X-HTTP-Method-Override if HTTP DELETE is not supported. 

void delete(java.lang.Object o)

Invokes the DELETE method with a request entity and no response. May use X-HTTP-Method-Override if HTTP DELETE is not supported. 

java.lang.Object get(java.lang.Class c)

Invokes the GET method. 

java.lang.Object get(java.lang.Class c, boolean ignoreCache)

Invokes the GET method, possibly ignoring local cache. 

java.util.Hashtable head()

Invokes the HEAD method, returning a hash table with all the HTTP headers returned. 

void post()

Invokes the POST method with no request entity or response. 

java.lang.Object post(java.lang.Class c)

Invokes the POST method with no request entity that returns a response. 

java.lang.Object post(java.lang.Class c, java.lang.Object o)

Invokes the POST method with a request entity that returns a response. 

void post(java.lang.Object o)

Invokes the POST method with a request entity and no response. 

void put()

Invokes the PUT method with no request entity or response. May use X-HTTP-Method-Override if HTTP PUT is not supported. 

java.lang.Object put(java.lang.Class c)

Invokes the PUT method with no request entity that returns a response. May use X-HTTP-Method-Override if HTTP PUT is not supported. 

java.lang.Object put(java.lang.Class c, java.lang.Object o)

Invokes the PUT method with a request entity that returns a response. May use X-HTTP-Method-Override if HTTP PUT is not supported. 

void put(java.lang.Object o)

Invokes the PUT method with a request entity and no response. May use X-HTTP-Method-Override if HTTP PUT is not supported. 

UniformInterface type(java.lang.String type)

Sets a Content-Type HTTP header.