com.bradmcevoy.http
Class AbstractResponse
java.lang.Object
com.bradmcevoy.http.AbstractResponse
- All Implemented Interfaces:
- Response
- Direct Known Subclasses:
- DebugFilter.DebugResponse
public abstract class AbstractResponse
- extends java.lang.Object
- implements Response
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
contentLength
protected java.lang.Long contentLength
AbstractResponse
public AbstractResponse()
setResponseHeader
public void setResponseHeader(Response.Header header,
java.lang.String value)
getResponseHeader
public java.lang.String getResponseHeader(Response.Header header)
setContentEncodingHeader
public void setContentEncodingHeader(Response.ContentEncoding encoding)
- Specified by:
setContentEncodingHeader in interface Response
getContentLength
public java.lang.Long getContentLength()
- Specified by:
getContentLength in interface Response
- Returns:
- - the content length which might have been set by a handler, or null
if none has been set
setDateHeader
public void setDateHeader(java.util.Date date)
- Specified by:
setDateHeader in interface Response
setContentRangeHeader
public void setContentRangeHeader(long start,
long finish,
java.lang.Long totalLength)
- Specified by:
setContentRangeHeader in interface Response
setContentLengthHeader
public void setContentLengthHeader(java.lang.Long totalLength)
- Specified by:
setContentLengthHeader in interface Response
setContentTypeHeader
public void setContentTypeHeader(java.lang.String type)
- Specified by:
setContentTypeHeader in interface Response
getContentTypeHeader
public java.lang.String getContentTypeHeader()
- Specified by:
getContentTypeHeader in interface Response
setCacheControlMaxAgeHeader
public void setCacheControlMaxAgeHeader(java.lang.Long delta)
- Description copied from interface:
Response
- Set the cache control header to allow the resource to be cached
for the given number of seconds
- Specified by:
setCacheControlMaxAgeHeader in interface Response
- Parameters:
delta - - must not be null
setCacheControlPrivateMaxAgeHeader
public void setCacheControlPrivateMaxAgeHeader(java.lang.Long delta)
- Specified by:
setCacheControlPrivateMaxAgeHeader in interface Response
setExpiresHeader
public void setExpiresHeader(java.util.Date expiresAt)
- Specified by:
setExpiresHeader in interface Response
setEtag
public void setEtag(java.lang.String uniqueId)
- Specified by:
setEtag in interface Response
setLastModifiedHeader
public void setLastModifiedHeader(java.util.Date date)
- Specified by:
setLastModifiedHeader in interface Response
setCacheControlNoCacheHeader
public void setCacheControlNoCacheHeader()
- Description copied from interface:
Response
- Set the cache control header to indicate that the resource should not
be cached
- Specified by:
setCacheControlNoCacheHeader in interface Response
setLocationHeader
public void setLocationHeader(java.lang.String redirectUrl)
- Specified by:
setLocationHeader in interface Response
setAllowHeader
public void setAllowHeader(java.util.List<java.lang.String> methodsAllowed)
- Specified by:
setAllowHeader in interface Response
setLockTokenHeader
public void setLockTokenHeader(java.lang.String s)
- Specified by:
setLockTokenHeader in interface Response
setDavHeader
public void setDavHeader(java.lang.String supportedLevels)
- Specified by:
setDavHeader in interface Response
setVaryHeader
public void setVaryHeader(java.lang.String value)
- Description copied from interface:
Response
- Sets the Vary response header, necessary for response compression
- Specified by:
setVaryHeader in interface Response
close
public void close()
- Specified by:
close in interface Response
sendRedirect
public void sendRedirect(java.lang.String url)
- Description copied from interface:
Response
- Will set the status to moved_temporaruly and set the location header
to the given url
- Specified by:
sendRedirect in interface Response
write
public void write(java.lang.String s)
setAnyDateHeader
protected void setAnyDateHeader(Response.Header name,
java.util.Date date)
Copyright © 2011. All Rights Reserved.