public class MSF4JResponse
extends javax.ws.rs.core.Response
| Modifier and Type | Class and Description |
|---|---|
class |
MSF4JResponse.Builder
Trimmed Convenient builder for MSF4JResponse instances.
|
| Constructor and Description |
|---|
MSF4JResponse() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
bufferEntity() |
static void |
clearBaseUri()
Remove the current thread's value for baseUri thread-local variable (set by
setBaseUri(java.net.URI)). |
void |
close() |
Set<String> |
getAllowedMethods() |
Map<String,javax.ws.rs.core.NewCookie> |
getCookies() |
Date |
getDate() |
Object |
getEntity() |
javax.ws.rs.core.EntityTag |
getEntityTag() |
String |
getHeaderString(String name) |
Locale |
getLanguage() |
Date |
getLastModified() |
int |
getLength() |
javax.ws.rs.core.Link |
getLink(String relation) |
javax.ws.rs.core.Link.Builder |
getLinkBuilder(String relation) |
Set<javax.ws.rs.core.Link> |
getLinks() |
URI |
getLocation() |
javax.ws.rs.core.MediaType |
getMediaType() |
javax.ws.rs.core.MultivaluedMap<String,Object> |
getMetadata() |
int |
getStatus() |
javax.ws.rs.core.Response.StatusType |
getStatusInfo() |
javax.ws.rs.core.MultivaluedMap<String,String> |
getStringHeaders() |
boolean |
hasEntity() |
boolean |
hasLink(String relation) |
<T> T |
readEntity(Class<T> entityType) |
<T> T |
readEntity(Class<T> entityType,
Annotation[] annotations) |
<T> T |
readEntity(javax.ws.rs.core.GenericType<T> entityType) |
<T> T |
readEntity(javax.ws.rs.core.GenericType<T> entityType,
Annotation[] annotations) |
static void |
setBaseUri(URI baseUri)
Set the
baseUri of the actual request into the InheritableThreadLocal. |
void |
setCookies(Map<String,javax.ws.rs.core.NewCookie> cookies) |
void |
setEntity(Object entity) |
void |
setHeaders(javax.ws.rs.core.MultivaluedMap<String,String> headers) |
void |
setStatus(int status) |
void |
setType(javax.ws.rs.core.MediaType type) |
public static void setBaseUri(URI baseUri)
baseUri of the actual request into the InheritableThreadLocal.
The baseUri will be used for absolutizing the location header
content in case that only a relative URI is provided.
After resource method invocation when the value is not needed
any more to be stored in ThreadLocal clearBaseUri() should be
called for cleanup in order to prevent possible memory leaks.
baseUri - - baseUri of the actual requestMSF4JResponse.Builder.location(URI)public static void clearBaseUri()
setBaseUri(java.net.URI)).
Should be called after resource method invocation for cleanup.MSF4JResponse.Builder.location(URI)public int getStatus()
getStatus in class javax.ws.rs.core.Responsepublic void setStatus(int status)
public javax.ws.rs.core.Response.StatusType getStatusInfo()
getStatusInfo in class javax.ws.rs.core.Responsepublic Object getEntity()
getEntity in class javax.ws.rs.core.Responsepublic void setEntity(Object entity)
public <T> T readEntity(Class<T> entityType)
readEntity in class javax.ws.rs.core.Responsepublic <T> T readEntity(javax.ws.rs.core.GenericType<T> entityType)
readEntity in class javax.ws.rs.core.Responsepublic <T> T readEntity(Class<T> entityType, Annotation[] annotations)
readEntity in class javax.ws.rs.core.Responsepublic <T> T readEntity(javax.ws.rs.core.GenericType<T> entityType,
Annotation[] annotations)
readEntity in class javax.ws.rs.core.Responsepublic boolean hasEntity()
hasEntity in class javax.ws.rs.core.Responsepublic boolean bufferEntity()
bufferEntity in class javax.ws.rs.core.Responsepublic void close()
close in class javax.ws.rs.core.Responsepublic javax.ws.rs.core.MediaType getMediaType()
getMediaType in class javax.ws.rs.core.Responsepublic Locale getLanguage()
getLanguage in class javax.ws.rs.core.Responsepublic int getLength()
getLength in class javax.ws.rs.core.Responsepublic Set<String> getAllowedMethods()
getAllowedMethods in class javax.ws.rs.core.Responsepublic Map<String,javax.ws.rs.core.NewCookie> getCookies()
getCookies in class javax.ws.rs.core.Responsepublic javax.ws.rs.core.EntityTag getEntityTag()
getEntityTag in class javax.ws.rs.core.Responsepublic Date getDate()
getDate in class javax.ws.rs.core.Responsepublic Date getLastModified()
getLastModified in class javax.ws.rs.core.Responsepublic URI getLocation()
getLocation in class javax.ws.rs.core.Responsepublic Set<javax.ws.rs.core.Link> getLinks()
getLinks in class javax.ws.rs.core.Responsepublic boolean hasLink(String relation)
hasLink in class javax.ws.rs.core.Responsepublic javax.ws.rs.core.Link getLink(String relation)
getLink in class javax.ws.rs.core.Responsepublic javax.ws.rs.core.Link.Builder getLinkBuilder(String relation)
getLinkBuilder in class javax.ws.rs.core.Responsepublic javax.ws.rs.core.MultivaluedMap<String,Object> getMetadata()
getMetadata in class javax.ws.rs.core.Responsepublic javax.ws.rs.core.MultivaluedMap<String,String> getStringHeaders()
getStringHeaders in class javax.ws.rs.core.Responsepublic String getHeaderString(String name)
getHeaderString in class javax.ws.rs.core.Responsepublic void setType(javax.ws.rs.core.MediaType type)
Copyright © 2023 WSO2. All rights reserved.