org.apache.abdera.protocol.server.context
Class BaseResponseContext<T extends Base>

java.lang.Object
  extended by org.apache.abdera.protocol.util.AbstractMessage
      extended by org.apache.abdera.protocol.util.AbstractResponse
          extended by org.apache.abdera.protocol.server.context.AbstractResponseContext
              extended by org.apache.abdera.protocol.server.context.BaseResponseContext<T>
All Implemented Interfaces:
Message, Response, ResponseContext, ProtocolConstants

public class BaseResponseContext<T extends Base>
extends AbstractResponseContext


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.abdera.protocol.Response
Response.ResponseType
 
Field Summary
 
Fields inherited from class org.apache.abdera.protocol.server.context.AbstractResponseContext
binary, EMPTY, headers, status, status_text, writer
 
Fields inherited from class org.apache.abdera.protocol.util.AbstractResponse
nocache_headers, private_headers, smax_age
 
Fields inherited from class org.apache.abdera.protocol.util.AbstractMessage
flags, max_age
 
Fields inherited from interface org.apache.abdera.protocol.util.ProtocolConstants
NOCACHE, NOSTORE, NOTRANSFORM, ONLYIFCACHED, PRIVATE, PROXYREVALIDATE, PUBLIC, REVALIDATE
 
Constructor Summary
BaseResponseContext(T base)
           
BaseResponseContext(T base, boolean chunked)
           
 
Method Summary
 T getBase()
           
 long getContentLength()
          Get the value of the Content-Length response header
 javax.activation.MimeType getContentType()
          Return the value of the Content-Type header
 boolean hasEntity()
          True if the response contains an entity
 void writeTo(OutputStream out)
          Write the response out to the specified OutputStream
 void writeTo(OutputStream out, Writer writer)
          Write the response out to the specified OutputStream
 void writeTo(Writer javaWriter)
          Write the response out to the specified Writer
 void writeTo(Writer javaWriter, Writer abderaWriter)
          Write the response out to the specified Writer
 
Methods inherited from class org.apache.abdera.protocol.server.context.AbstractResponseContext
addEncodedHeader, addEncodedHeaders, addHeader, addHeaders, getCacheControl, getDateHeader, getHeader, getHeaderNames, getHeaders, getHeaders, getStatus, getStatusText, isBinary, removeHeader, setAge, setAllow, setAllow, setBinary, setContentLanguage, setContentLength, setContentLocation, setContentType, setContentType, setEncodedHeader, setEncodedHeader, setEntityTag, setEntityTag, setEscapedHeader, setExpires, setHeader, setHeader, setLastModified, setLocation, setSlug, setStatus, setStatusText, setWriter
 
Methods inherited from class org.apache.abdera.protocol.util.AbstractResponse
getAge, getAllow, getEntityTag, getExpires, getLastModified, getLocation, getNoCacheHeaders, getPrivateHeaders, getSMaxAge, getType, isMustRevalidate, isPrivate, isProxyRevalidate, isPublic, setMaxAge, setMustRevalidate, setNoCache, setNoCacheHeaders, setNoStore, setNoTransform, setPrivate, setPrivateHeaders, setProxyRevalidate, setPublic
 
Methods inherited from class org.apache.abdera.protocol.util.AbstractMessage
check, getContentLanguage, getContentLocation, getDecodedHeader, getDecodedHeaders, getMaxAge, getSlug, isNoCache, isNoStore, isNoTransform, toggle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.abdera.protocol.Response
getAge, getAllow, getEntityTag, getExpires, getLastModified, getLocation, getNoCacheHeaders, getPrivateHeaders, getSMaxAge, getType, isMustRevalidate, isPrivate, isProxyRevalidate, isPublic
 
Methods inherited from interface org.apache.abdera.protocol.Message
getContentLanguage, getContentLocation, getDecodedHeader, getDecodedHeaders, getMaxAge, getSlug, isNoCache, isNoStore, isNoTransform
 

Constructor Detail

BaseResponseContext

public BaseResponseContext(T base)

BaseResponseContext

public BaseResponseContext(T base,
                           boolean chunked)
Method Detail

getBase

public T getBase()

hasEntity

public boolean hasEntity()
Description copied from interface: ResponseContext
True if the response contains an entity


writeTo

public void writeTo(Writer javaWriter)
             throws IOException
Description copied from interface: ResponseContext
Write the response out to the specified Writer

Throws:
IOException

writeTo

public void writeTo(OutputStream out)
             throws IOException
Description copied from interface: ResponseContext
Write the response out to the specified OutputStream

Throws:
IOException

getContentType

public javax.activation.MimeType getContentType()
Description copied from interface: Message
Return the value of the Content-Type header

Specified by:
getContentType in interface Message
Overrides:
getContentType in class AbstractMessage

getContentLength

public long getContentLength()
Description copied from interface: Response
Get the value of the Content-Length response header

Specified by:
getContentLength in interface Response
Overrides:
getContentLength in class AbstractResponse

writeTo

public void writeTo(OutputStream out,
                    Writer writer)
             throws IOException
Description copied from interface: ResponseContext
Write the response out to the specified OutputStream

Throws:
IOException

writeTo

public void writeTo(Writer javaWriter,
                    Writer abderaWriter)
             throws IOException
Description copied from interface: ResponseContext
Write the response out to the specified Writer

Throws:
IOException


Copyright © 2006-2010 Apache Software Foundation. All Rights Reserved.