Home | History | Annotate | Download | only in message
      1 package javax.sip.message;
      2 
      3 import java.io.Serializable;
      4 import java.text.ParseException;
      5 import java.util.ListIterator;
      6 import javax.sip.SipException;
      7 import javax.sip.header.ContentDispositionHeader;
      8 import javax.sip.header.ContentEncodingHeader;
      9 import javax.sip.header.ContentLanguageHeader;
     10 import javax.sip.header.ContentLengthHeader;
     11 import javax.sip.header.ContentTypeHeader;
     12 import javax.sip.header.ExpiresHeader;
     13 import javax.sip.header.Header;
     14 
     15 public interface Message extends Cloneable, Serializable {
     16     void addFirst(Header header) throws SipException, NullPointerException;
     17     void addHeader(Header header);
     18     void addLast(Header header) throws SipException, NullPointerException;
     19 
     20     Header getHeader(String headerName);
     21     void setHeader(Header header);
     22 
     23     void removeFirst(String headerName) throws NullPointerException;
     24     void removeLast(String headerName) throws NullPointerException;
     25     void removeHeader(String headerName);
     26 
     27     ListIterator getHeaderNames();
     28     ListIterator getHeaders(String headerName);
     29     ListIterator getUnrecognizedHeaders();
     30 
     31     Object getApplicationData();
     32     void setApplicationData(Object applicationData);
     33 
     34     ContentLengthHeader getContentLength();
     35     void setContentLength(ContentLengthHeader contentLength);
     36 
     37     ContentLanguageHeader getContentLanguage();
     38     void setContentLanguage(ContentLanguageHeader contentLanguage);
     39 
     40     ContentEncodingHeader getContentEncoding();
     41     void setContentEncoding(ContentEncodingHeader contentEncoding);
     42 
     43     ContentDispositionHeader getContentDisposition();
     44     void setContentDisposition(ContentDispositionHeader contentDisposition);
     45 
     46     Object getContent();
     47     byte[] getRawContent();
     48     void setContent(Object content, ContentTypeHeader contentTypeHeader)
     49             throws ParseException;
     50     void removeContent();
     51 
     52 
     53     ExpiresHeader getExpires();
     54     void setExpires(ExpiresHeader expires);
     55 
     56     String getSIPVersion();
     57     void setSIPVersion(String version) throws ParseException;
     58 
     59     Object clone();
     60     boolean equals(Object object);
     61     int hashCode();
     62     String toString();
     63 }
     64