org.apache.abdera.protocol.util
Class AbstractMessage

java.lang.Object
  extended by org.apache.abdera.protocol.util.AbstractMessage
All Implemented Interfaces:
Message, ProtocolConstants
Direct Known Subclasses:
AbstractRequest, AbstractResponse

public abstract class AbstractMessage
extends Object
implements Message

Root impl for Message interface impls. This is provided solely as a way of keeping the interface and impl's consistent across the Request and Response objects.


Field Summary
protected  int flags
           
protected  long max_age
           
 
Fields inherited from interface org.apache.abdera.protocol.util.ProtocolConstants
NOCACHE, NOSTORE, NOTRANSFORM, ONLYIFCACHED, PRIVATE, PROXYREVALIDATE, PUBLIC, REVALIDATE
 
Constructor Summary
AbstractMessage()
           
 
Method Summary
protected  boolean check(int flag)
           
 String getCacheControl()
          Return the value of the Cache-Control header
 String getContentLanguage()
          Return the value of the Content-Language header
 IRI getContentLocation()
          Return the value of the Content-Location header
 javax.activation.MimeType getContentType()
          Return the value of the Content-Type header
 String getDecodedHeader(String header)
          Get the decoded value of a RFC 2047 header
 String[] getDecodedHeaders(String header)
          Return multiple decoded values for the specified header
 long getMaxAge()
          Return the maximum-age as specified by the Cache-Control header
 String getSlug()
          Return the value of the Slug header
 boolean isNoCache()
          Return true if the Cache-Control header contains no-cache
 boolean isNoStore()
          Return true if the Cache-Control header contains no-store
 boolean isNoTransform()
          Return true if the Cache-Control header contains no-transform
protected  void toggle(boolean val, int flag)
           
 
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.Message
getDateHeader, getHeader, getHeaderNames, getHeaders
 

Field Detail

flags

protected int flags

max_age

protected long max_age
Constructor Detail

AbstractMessage

public AbstractMessage()
Method Detail

getCacheControl

public String getCacheControl()
Description copied from interface: Message
Return the value of the Cache-Control header

Specified by:
getCacheControl in interface Message

getContentLanguage

public String getContentLanguage()
Description copied from interface: Message
Return the value of the Content-Language header

Specified by:
getContentLanguage in interface Message

getContentLocation

public IRI getContentLocation()
Description copied from interface: Message
Return the value of the Content-Location header

Specified by:
getContentLocation in interface Message

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

getDecodedHeader

public String getDecodedHeader(String header)
Description copied from interface: Message
Get the decoded value of a RFC 2047 header

Specified by:
getDecodedHeader in interface Message

getDecodedHeaders

public String[] getDecodedHeaders(String header)
Description copied from interface: Message
Return multiple decoded values for the specified header

Specified by:
getDecodedHeaders in interface Message

getSlug

public String getSlug()
Description copied from interface: Message
Return the value of the Slug header

Specified by:
getSlug in interface Message

check

protected boolean check(int flag)

toggle

protected void toggle(boolean val,
                      int flag)

isNoCache

public boolean isNoCache()
Description copied from interface: Message
Return true if the Cache-Control header contains no-cache

Specified by:
isNoCache in interface Message

isNoStore

public boolean isNoStore()
Description copied from interface: Message
Return true if the Cache-Control header contains no-store

Specified by:
isNoStore in interface Message

isNoTransform

public boolean isNoTransform()
Description copied from interface: Message
Return true if the Cache-Control header contains no-transform

Specified by:
isNoTransform in interface Message

getMaxAge

public long getMaxAge()
Description copied from interface: Message
Return the maximum-age as specified by the Cache-Control header

Specified by:
getMaxAge in interface Message


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