org.openrdf.server.metadata.http
Class Response

java.lang.Object
  extended by org.openrdf.server.metadata.http.Response

public class Response
extends Object

Builds an HTTP response.

Author:
James Leigh

Constructor Summary
Response()
           
 
Method Summary
 Response badRequest()
           
 Response badRequest(Exception e)
           
 Response client(Exception error)
           
 Response conflict(ConcurrencyException e)
           
 Response entity(File entity)
           
 Response entity(Object entity)
           
 Object getEntity()
           
 Class<?> getEntityType()
           
 String getHeader(String header)
           
 Set<String> getHeaderNames()
           
 Long getLastModified()
           
 int getStatus()
           
 Response head()
           
 Response header(String header, String value)
           
 boolean isHead()
           
 boolean isNoContent()
           
 boolean isOk()
           
 Response lastModified(long lastModified)
           
 Response location(String location)
           
 Response noContent()
           
 Response notFound()
           
 Response notModified()
           
 Response preconditionFailed()
           
 Response server(Exception error)
           
 void setEntityType(Class<?> type)
           
 Response status(int status)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Response

public Response()
Method Detail

badRequest

public Response badRequest()

badRequest

public Response badRequest(Exception e)

client

public Response client(Exception error)

entity

public Response entity(File entity)

entity

public Response entity(Object entity)

getLastModified

public Long getLastModified()

getEntity

public Object getEntity()

getEntityType

public Class<?> getEntityType()

setEntityType

public void setEntityType(Class<?> type)

getHeaderNames

public Set<String> getHeaderNames()
                           throws MimeTypeParseException
Throws:
MimeTypeParseException

getHeader

public String getHeader(String header)

getStatus

public int getStatus()

head

public Response head()

header

public Response header(String header,
                       String value)

isHead

public boolean isHead()

isNoContent

public boolean isNoContent()

isOk

public boolean isOk()

lastModified

public Response lastModified(long lastModified)

location

public Response location(String location)

noContent

public Response noContent()

notFound

public Response notFound()

notModified

public Response notModified()

preconditionFailed

public Response preconditionFailed()

server

public Response server(Exception error)

status

public Response status(int status)

conflict

public Response conflict(ConcurrencyException e)


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