public interface RestResult extends ResponseMessage
Modifier and Type | Method and Description |
---|---|
Set<String> |
getAllow()
Get the allowed HTTP methods from the Allow HTTP header.
|
List<javax.ws.rs.core.NewCookie> |
getCookies()
Get the list of cookies.
|
javax.ws.rs.core.EntityTag |
getEntityTag()
Get the entity tag.
|
javax.ws.rs.core.MultivaluedMap<String,String> |
getHeaders()
Get the HTTP headers of the response.
|
String |
getLanguage()
Get the language.
|
Date |
getLastModified()
Get the last modified date.
|
int |
getLength()
Get Content-Length.
|
URI |
getLocation()
Get the location.
|
Date |
getResponseDate()
Get response date (server side).
|
int |
getStatus()
Get the status code.
|
boolean |
hasEntity()
Checks if there is an entity available.
|
Object |
value()
Get the resolved content of the REST invocation.
|
getSipApplicationSessionId, getType, isError
Object value() throws ExecutionException, InterruptedException
If the content-type is text/plain, this method will return a String.
If the content-type is application/json, this method
will return a parsed JSON using groovy.json.JsonSlurper
.
If the content-type is
application/xml, it will return a parsed XML using groovy.util.XmlSlurper
.
Refer to Groovy api documentation for more information.
ExecutionException
- If there is failure in execution of the invocation.InterruptedException
- If the asynchronous execution is interrupted.int getStatus()
javax.ws.rs.core.MultivaluedMap<String,String> getHeaders()
boolean hasEntity()
URI getLocation()
null
if not present.javax.ws.rs.core.EntityTag getEntityTag()
null
if not present.Date getLastModified()
null
if not present.Date getResponseDate()
null
if not present.String getLanguage()
null
if not present.int getLength()
List<javax.ws.rs.core.NewCookie> getCookies()