org.overlord.sramp.atom.beans
Class HttpResponseBean

java.lang.Object
  extended by org.overlord.sramp.atom.beans.HttpResponseBean

public class HttpResponseBean
extends Object

Simple bean class that models an HTTP response. This class is used by the Atom layer's batch functionality in order to return the values defined in the S-RAMP specification (a list of HTTP responses as multipart/mixed content).

Author:
eric.wittmann@redhat.com

Constructor Summary
HttpResponseBean(int code, String status)
          Constructor.
 
Method Summary
 Object getBody()
           
 javax.ws.rs.core.MediaType getBodyType()
          Returns the content type of the body.
 int getCode()
           
 Map<String,String> getHeaders()
           
 String getStatus()
           
 void setBody(Object body, javax.ws.rs.core.MediaType type)
           
 void setBodyType(javax.ws.rs.core.MediaType type)
          Returns the content type of the body.
 void setCode(int code)
           
 void setHeader(String name, String value)
          Sets a single header.
 void setHeaders(Map<String,String> headers)
           
 void setStatus(String status)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpResponseBean

public HttpResponseBean(int code,
                        String status)
Constructor.

Parameters:
code -
status -
Method Detail

getCode

public int getCode()
Returns:
the code

setCode

public void setCode(int code)
Parameters:
code - the code to set

getStatus

public String getStatus()
Returns:
the status

setStatus

public void setStatus(String status)
Parameters:
status - the status to set

getHeaders

public Map<String,String> getHeaders()
Returns:
the headers

setHeader

public void setHeader(String name,
                      String value)
Sets a single header.

Parameters:
name -
value -

setHeaders

public void setHeaders(Map<String,String> headers)
Parameters:
headers - the headers to set

getBody

public Object getBody()
Returns:
the body

setBody

public void setBody(Object body,
                    javax.ws.rs.core.MediaType type)
Parameters:
body - the body to set
type - the content type of the body

getBodyType

public javax.ws.rs.core.MediaType getBodyType()
Returns the content type of the body.


setBodyType

public void setBodyType(javax.ws.rs.core.MediaType type)
Returns the content type of the body.

Parameters:
type -


Copyright © 2011-2013 JBoss, a division of Red Hat. All Rights Reserved.