org.openrdf.http.object.model
Class Response
java.lang.Object
org.apache.http.message.AbstractHttpMessage
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
| Fields inherited from class org.apache.http.message.AbstractHttpMessage |
headergroup, params |
| 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 |
Response
public Response()
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.