public interface ClientResponseContext
Modifier and Type | Method and Description |
---|---|
Set<String> |
getAllowedMethods()
Get the allowed HTTP methods from the Allow HTTP header.
|
Map<String,NewCookie> |
getCookies()
Get any new cookies set on the response message.
|
Date |
getDate()
Get message date.
|
InputStream |
getEntityStream()
Get the entity input stream.
|
EntityTag |
getEntityTag()
Get the entity tag.
|
MultivaluedMap<String,String> |
getHeaders()
Get the mutable response headers multivalued map.
|
String |
getHeaderString(String name)
Get a message header as a single string value.
|
Locale |
getLanguage()
Get the language of the entity.
|
Date |
getLastModified()
Get the last modified date.
|
int |
getLength()
Get Content-Length value.
|
Link |
getLink(String relation)
Get the link for the relation.
|
Link.Builder |
getLinkBuilder(String relation)
Convenience method that returns a
Link.Builder
for the relation. |
Set<Link> |
getLinks()
Get the links attached to the message as header.
|
URI |
getLocation()
Get the location.
|
MediaType |
getMediaType()
Get the media type of the entity.
|
int |
getStatus()
Get the status code associated with the response.
|
Response.StatusType |
getStatusInfo()
Get the complete status information associated with the response.
|
boolean |
hasEntity()
Check if there is a non-empty entity input stream is available in the response
message.
|
boolean |
hasLink(String relation)
Check if link for relation exists.
|
void |
setEntityStream(InputStream input)
Set a new entity input stream.
|
void |
setStatus(int code)
Set a new response status code.
|
void |
setStatusInfo(Response.StatusType statusInfo)
Set the complete status information (status code and reason phrase) associated
with the response.
|
int getStatus()
void setStatus(int code)
code
- new status code.Response.StatusType getStatusInfo()
null
if the status was
not set.void setStatusInfo(Response.StatusType statusInfo)
statusInfo
- the response status information.MultivaluedMap<String,String> getHeaders()
getHeaderString(String)
String getHeaderString(String name)
name
- the message header.null
is returned. If the message header is present but has no
value then the empty string is returned. If the message header is present
more than once then the values of joined together and separated by a ','
character.getHeaders()
Set<String> getAllowedMethods()
Date getDate()
null
if not present.Locale getLanguage()
null
if not specifiedint getLength()
MediaType getMediaType()
null
if not specified (e.g. there's no
response entity).Map<String,NewCookie> getCookies()
new cookie
.EntityTag getEntityTag()
null
if not present.Date getLastModified()
null
if not present.URI getLocation()
null
if not present.Set<Link> getLinks()
Set
if no links are present. Never
returns null
.boolean hasLink(String relation)
relation
- link relation.true
if the for the relation link exists, false
otherwise.Link getLink(String relation)
relation
- link relation.null
if not present.Link.Builder getLinkBuilder(String relation)
Link.Builder
for the relation.relation
- link relation.null
if not
present.boolean hasEntity()
true
if the entity is present, returns
false
otherwise.true
if there is an entity present in the message,
false
otherwise.InputStream getEntityStream()
void setEntityStream(InputStream input)
input
- new entity input stream.Copyright © 2016 JBoss by Red Hat. All rights reserved.