1 package gov.nist.javax.sip.message; 2 3 import java.text.ParseException; 4 5 import javax.sip.header.CSeqHeader; 6 import javax.sip.header.CallIdHeader; 7 import javax.sip.header.ContentLengthHeader; 8 import javax.sip.header.ContentTypeHeader; 9 import javax.sip.header.FromHeader; 10 import javax.sip.header.ToHeader; 11 import javax.sip.header.ViaHeader; 12 import javax.sip.message.Message; 13 14 /** 15 * 16 * @author jean.deruelle@gmail.com 17 * 18 */ 19 public interface MessageExt extends Message { 20 21 /** 22 * This method allows applications to associate application context with 23 * the message. This specification does not define the format of this 24 * data, this the responsibility of the application and is dependent 25 * on the application. 26 * this application data is un-interpreted by the stack. 27 * Beware : when you clone a message, the deepcopy does not apply to the application data 28 * (instead, we would just make a copy of the pointer). 29 * 30 * @param applicationData - un-interpreted application data. 31 * @since v2.0 32 * 33 */ 34 setApplicationData(Object applicationData)35 public void setApplicationData (Object applicationData); 36 37 38 /** 39 * Returns the application data associated with the transaction.This 40 * specification does not define the format of this application specific 41 * data. This is the responsibility of the application. 42 * 43 * @return application data associated with the message by the application. 44 * @since v2.0 45 * 46 */ getApplicationData()47 public Object getApplicationData(); 48 49 /** 50 * Get the multipart mime content from a message. Builds a wrapper around the 51 * content and breaks it into multiple sections. Returns these sections as 52 * a multipart mime content list. If the content type is not multipart mime 53 * then the list will have a single element in it. 54 * 55 * @since v2.0 56 * @param Message message 57 * @throws ParseException if the content type is multipart mime but the content 58 * is not properly encoded. 59 * 60 */ getMultipartMimeContent()61 public MultipartMimeContent getMultipartMimeContent() throws ParseException; 62 63 /** 64 * Get the topmost Via header. 65 * 66 * @since v2.0 67 */ getTopmostViaHeader()68 public ViaHeader getTopmostViaHeader(); 69 70 /** 71 * Get the From header or null if none present. 72 * 73 * @since v2.0 74 */ getFromHeader()75 public FromHeader getFromHeader(); 76 77 /** 78 * Get the To header or null if none present. 79 * 80 * @since v2.0 81 */ getToHeader()82 public ToHeader getToHeader(); 83 84 85 /** 86 * Get the callId header or null if none present. 87 * 88 * @since v2.0 89 */ getCallIdHeader()90 public CallIdHeader getCallIdHeader(); 91 92 /** 93 * Get the CSeq header or null if none present. 94 * 95 * @since v2.0 96 */ getCSeqHeader()97 public CSeqHeader getCSeqHeader(); 98 99 /** 100 * Get the content type header or null if none present. 101 * 102 * @since v2.0 103 */ getContentTypeHeader()104 public ContentTypeHeader getContentTypeHeader(); 105 106 /** 107 * Get the content length header or null if none present. 108 * 109 * @since v2.0 110 */ getContentLengthHeader()111 public ContentLengthHeader getContentLengthHeader(); 112 113 /** 114 * Get the first line of the request or response. 115 * 116 * @since v2.0 117 */ getFirstLine()118 public String getFirstLine(); 119 120 } 121