org.openrdf.http.object.model
Class Response

java.lang.Object
  extended by org.apache.http.message.AbstractHttpMessage
      extended by org.openrdf.http.object.model.Response
All Implemented Interfaces:
org.apache.http.HttpMessage

public class Response
extends org.apache.http.message.AbstractHttpMessage

Builds an HTTP response.

Author:
James Leigh

Field Summary
 
Fields inherited from class org.apache.http.message.AbstractHttpMessage
headergroup, params
 
Constructor Summary
Response()
           
 
Method Summary
 Response badRequest(Exception e)
           
 Response conflict(ConcurrencyException e)
           
 Response entity(ResponseEntity entity)
           
 Response exception(ResponseException e)
           
 Class<?> getEntityType()
           
 ResponseException getException()
           
 String getHeader(String header)
           
 Long getLastModified()
           
 String getMessage()
           
 List<Runnable> getOnClose()
           
 org.apache.http.ProtocolVersion getProtocolVersion()
           
 ResponseEntity getResponseEntity()
           
 long getSize(String mimeType, Charset charset)
           
 int getStatus()
           
 int getStatusCode()
           
 Response header(String header, String value)
           
 boolean isContent()
           
 boolean isException()
           
 boolean isNoContent()
           
 boolean isOk()
           
 long lastModified()
           
 Response lastModified(long lastModified, String text)
           
 Response location(String location)
           
 Response noContent()
           
 Response notFound()
           
 Response notModified()
           
 Response onClose(Runnable task)
           
 Response preconditionFailed()
           
 Response preconditionFailed(String notice)
           
 Response server(Exception error)
           
 void setEntityType(Class<?> type)
           
 Response status(int status, String msg)
           
 String toString()
           
 Response unauthorized(org.apache.http.HttpResponse message, ObjectConnection con)
           
 ReadableByteChannel write(String mimeType, Charset charset)
           
 
Methods inherited from class org.apache.http.message.AbstractHttpMessage
addHeader, addHeader, containsHeader, getAllHeaders, getFirstHeader, getHeaders, getLastHeader, getParams, headerIterator, headerIterator, removeHeader, removeHeaders, setHeader, setHeader, setHeaders, setParams
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Response

public Response()
Method Detail

onClose

public Response onClose(Runnable task)

getOnClose

public List<Runnable> getOnClose()

unauthorized

public Response unauthorized(org.apache.http.HttpResponse message,
                             ObjectConnection con)
                      throws IOException
Throws:
IOException

exception

public Response exception(ResponseException e)

badRequest

public Response badRequest(Exception e)

conflict

public Response conflict(ConcurrencyException e)

entity

public Response entity(ResponseEntity entity)

getResponseEntity

public ResponseEntity getResponseEntity()

getEntityType

public Class<?> getEntityType()

getException

public ResponseException getException()

getHeader

public String getHeader(String header)

getLastModified

public Long getLastModified()

getSize

public long getSize(String mimeType,
                    Charset charset)

getStatus

public int getStatus()

getMessage

public String getMessage()

header

public Response header(String header,
                       String value)

isContent

public boolean isContent()

isException

public boolean isException()

isNoContent

public boolean isNoContent()

isOk

public boolean isOk()

lastModified

public long lastModified()

lastModified

public Response lastModified(long lastModified,
                             String text)

location

public Response location(String location)

noContent

public Response noContent()

notFound

public Response notFound()

notModified

public Response notModified()

preconditionFailed

public Response preconditionFailed()

preconditionFailed

public Response preconditionFailed(String notice)

server

public Response server(Exception error)

setEntityType

public void setEntityType(Class<?> type)

status

public Response status(int status,
                       String msg)

toString

public String toString()
Overrides:
toString in class Object

write

public ReadableByteChannel write(String mimeType,
                                 Charset charset)
                          throws IOException,
                                 OpenRDFException,
                                 XMLStreamException,
                                 TransformerException,
                                 ParserConfigurationException
Throws:
IOException
OpenRDFException
XMLStreamException
TransformerException
ParserConfigurationException

getStatusCode

public int getStatusCode()

getProtocolVersion

public org.apache.http.ProtocolVersion getProtocolVersion()


Copyright © 2004-2011 James Leigh Services Inc.. All Rights Reserved.