com.sun.jersey.core.spi.factory
Class ResponseImpl

java.lang.Object
  extended by javax.ws.rs.core.Response
      extended by com.sun.jersey.core.spi.factory.ResponseImpl

public class ResponseImpl
extends Response

An implementation of Response.

This implementation supports the declaration of an entity type that will be utilized when a MessageBodyWriter is selected to write out the entity.

Author:
Paul.Sandoz@Sun.Com

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.ws.rs.core.Response
Response.ResponseBuilder, Response.Status, Response.StatusType
 
Constructor Summary
protected ResponseImpl(int status, OutBoundHeaders headers, java.lang.Object entity, java.lang.reflect.Type entityType)
          Construct given a status, entity and metadata.
 
Method Summary
 java.lang.Object getEntity()
           
 java.lang.reflect.Type getEntityType()
          Get the entity type.
 MultivaluedMap<java.lang.String,java.lang.Object> getMetadata()
           
 int getStatus()
           
 
Methods inherited from class javax.ws.rs.core.Response
created, fromResponse, noContent, notAcceptable, notModified, notModified, notModified, ok, ok, ok, ok, ok, seeOther, serverError, status, status, status, temporaryRedirect
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResponseImpl

protected ResponseImpl(int status,
                       OutBoundHeaders headers,
                       java.lang.Object entity,
                       java.lang.reflect.Type entityType)
Construct given a status, entity and metadata.

Parameters:
status - the status
headers - the metadata, it is the callers responsibility to copy the metadata if necessary.
entity - the entity
entityType - the entity type, it is the callers responsiblity to ensure the entity type is compatible with the entity.
Method Detail

getEntityType

public java.lang.reflect.Type getEntityType()
Get the entity type.

Returns:
the entity type.

getStatus

public int getStatus()
Specified by:
getStatus in class Response

getMetadata

public MultivaluedMap<java.lang.String,java.lang.Object> getMetadata()
Specified by:
getMetadata in class Response

getEntity

public java.lang.Object getEntity()
Specified by:
getEntity in class Response


Copyright © 2010 Sun Microsystems, Inc. All Rights Reserved.