public class ResponseImpl
extends javax.ws.rs.core.Response
Response
.
This implementation supports the declaration of an entity type that will be
utilized when a MessageBodyWriter
is selected to write out the
entity.
Modifier | Constructor and Description |
---|---|
protected |
ResponseImpl(int status,
OutBoundHeaders headers,
Object entity,
Type entityType)
Construct given a status, entity and metadata.
|
protected |
ResponseImpl(javax.ws.rs.core.Response.StatusType statusType,
OutBoundHeaders headers,
Object entity,
Type entityType)
Construct given a status type, entity and metadata.
|
Modifier and Type | Method and Description |
---|---|
Object |
getEntity() |
Type |
getEntityType()
Get the entity type.
|
javax.ws.rs.core.MultivaluedMap<String,Object> |
getMetadata() |
int |
getStatus() |
javax.ws.rs.core.Response.StatusType |
getStatusType()
Get the status type.
|
static javax.ws.rs.core.Response.Status.Family |
toFamilyCode(int statusCode) |
static javax.ws.rs.core.Response.StatusType |
toStatusType(int statusCode) |
protected ResponseImpl(javax.ws.rs.core.Response.StatusType statusType, OutBoundHeaders headers, Object entity, Type entityType)
statusType
- the status typeheaders
- the metadata, it is the callers responsibility to copy
the metadata if necessary.entity
- the entityentityType
- the entity type, it is the callers responsibility to
ensure the entity type is compatible with the entity.protected ResponseImpl(int status, OutBoundHeaders headers, Object entity, Type entityType)
status
- the statusheaders
- the metadata, it is the callers responsibility to copy
the metadata if necessary.entity
- the entityentityType
- the entity type, it is the callers responsibility to
ensure the entity type is compatible with the entity.public javax.ws.rs.core.Response.StatusType getStatusType()
public Type getEntityType()
public int getStatus()
getStatus
in class javax.ws.rs.core.Response
public javax.ws.rs.core.MultivaluedMap<String,Object> getMetadata()
getMetadata
in class javax.ws.rs.core.Response
public Object getEntity()
getEntity
in class javax.ws.rs.core.Response
public static javax.ws.rs.core.Response.StatusType toStatusType(int statusCode)
public static javax.ws.rs.core.Response.Status.Family toFamilyCode(int statusCode)
Copyright © 2013 Oracle Corporation. All rights reserved.