Alignment API and Server 3.5

fr.inrialpes.exmo.align.service
Class HTMLAServProfile.Response

java.lang.Object
  extended by fr.inrialpes.exmo.align.service.HTMLAServProfile.Response
Enclosing class:
HTMLAServProfile

public class HTMLAServProfile.Response
extends Object

HTTP response. Return one of these from serve().


Field Summary
 InputStream data
          Data of the response, may be null.
 Properties header
          Headers for the HTTP response.
 String mimeType
          MIME type of content, e.g.
 String msg
           
 String status
          HTTP status code after processing, e.g.
 
Constructor Summary
HTMLAServProfile.Response()
          Default constructor: response = HTTP_OK, data = mime = 'null'
HTMLAServProfile.Response(String status, String mimeType, InputStream data)
          Basic constructor.
HTMLAServProfile.Response(String status, String mimeType, String txt)
          Convenience method that makes an InputStream out of given text.
 
Method Summary
 void addHeader(String name, String value)
          Adds given line to the header.
 String getContentType()
           
 String getData()
           
 String getStatus()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

status

public String status
HTTP status code after processing, e.g. "200 OK", HTTP_OK


mimeType

public String mimeType
MIME type of content, e.g. "text/html"


data

public InputStream data
Data of the response, may be null.


header

public Properties header
Headers for the HTTP response. Use addHeader() to add lines.


msg

public String msg
Constructor Detail

HTMLAServProfile.Response

public HTMLAServProfile.Response()
Default constructor: response = HTTP_OK, data = mime = 'null'


HTMLAServProfile.Response

public HTMLAServProfile.Response(String status,
                                 String mimeType,
                                 InputStream data)
Basic constructor.


HTMLAServProfile.Response

public HTMLAServProfile.Response(String status,
                                 String mimeType,
                                 String txt)
Convenience method that makes an InputStream out of given text.

Method Detail

addHeader

public void addHeader(String name,
                      String value)
Adds given line to the header.


getStatus

public String getStatus()

getContentType

public String getContentType()

getData

public String getData()

Alignment API and Server 3.5

(C) INRIA & friends, 2003-2008