|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Objectgov.nist.core.GenericObject
gov.nist.javax.sip.message.MessageObject
gov.nist.javax.sip.message.SIPMessage
public abstract class SIPMessage
This is the main SIP Message structure.
StringMsgParser
,
PipelinedMsgParser
,
直列化された形式コンストラクタの概要 | |
---|---|
SIPMessage()
Constructor: Initializes lists and list headers. |
メソッドの概要 | |
---|---|
void |
addHeader(javax.sip.header.Header sipHeader)
Add a SIP header. |
void |
addHeader(java.lang.String sipHeader)
Add a SIP header. |
void |
addUnparsed(java.lang.String unparsed)
Add a header to the unparsed list of headers. |
void |
attachHeader(SIPHeader h,
boolean replaceflag)
Attach a header to the end of the existing headers in this SIPMessage structure. |
void |
attachHeader(SIPHeader header,
boolean replaceFlag,
boolean top)
Attach the header to the SIP Message structure at a specified position in its list of headers. |
java.lang.Object |
clone()
clone this message (create a new deep physical copy). |
java.lang.String |
debugDump()
Get the string representation of this header (for pretty printing the generated structure). |
java.lang.String |
encode()
Encode this message as a string. |
byte[] |
encodeAsBytes()
Encode the message as a byte array. |
abstract java.lang.String |
encodeMessage()
Encode all the headers except the contents. |
boolean |
equals(java.lang.Object other)
Compare for equality. |
Authorization |
getAuthorization()
Get the Authorization header (null if one does not exist). |
javax.sip.header.CallIdHeader |
getCallId()
Get the CallID header (null if one does not exist) |
ContactList |
getContactHeaders()
Get the Contact list of headers (null if one does not exist). |
java.lang.Object |
getContent()
Get the content of the header. |
javax.sip.header.ContentDispositionHeader |
getContentDisposition()
get content disposition header or null if no such header exists. |
javax.sip.header.ContentEncodingHeader |
getContentEncoding()
get the content encoding header. |
javax.sip.header.ContentLanguageHeader |
getContentLanguage()
Get the contentLanguage header. |
javax.sip.header.ContentLengthHeader |
getContentLength()
Get the ContentLength header (null if one does not exist). |
ContentType |
getContentTypeHeader()
Get the contentType header (null if one does not exist). |
javax.sip.header.CSeqHeader |
getCSeq()
Get the CSeq list of header (null if one does not exist). |
abstract java.lang.String |
getDialogId(boolean isServerTransaction)
Get A dialog identifier constructed from this messsage. |
ErrorInfoList |
getErrorInfoHeaders()
Get the ErrorInfo list of headers (null if one does not exist). |
javax.sip.header.ExpiresHeader |
getExpires()
Get the exipres header. |
abstract java.lang.String |
getFirstLine()
Return the encoded first line. |
javax.sip.header.FromHeader |
getFrom()
Get the from header. |
java.lang.String |
getFromTag()
Return the from tag. |
javax.sip.header.Header |
getHeader(java.lang.String headerName)
Get the first header of the given name. |
java.util.ListIterator |
getHeaderNames()
Get the header names. |
java.util.ListIterator |
getHeaders()
Return an iterator for the list of headers in this message. |
java.util.ListIterator |
getHeaders(java.lang.String headerName)
Get a SIP header or Header list given its name. |
javax.sip.header.MaxForwardsHeader |
getMaxForwards()
Get the MaxForwards header (null if one does not exist). |
java.util.LinkedList |
getMessageAsEncodedStrings()
Get the headers as a linked list of encoded Strings |
java.lang.String |
getMessageContent()
Get the message body as a string. |
byte[] |
getRawContent()
Get the message content as an array of bytes. |
RecordRouteList |
getRecordRouteHeaders()
Get the RecordRoute header list (null if one does not exist). |
RouteList |
getRouteHeaders()
Get the Route List of headers (null if one does not exist). |
abstract java.lang.String |
getSIPVersion()
|
int |
getSize()
|
javax.sip.header.ToHeader |
getTo()
Get the To header (null if one does not exist). |
Via |
getTopmostVia()
Get the topmost via header. |
java.lang.String |
getToTag()
Return the to tag. |
java.lang.String |
getTransactionId()
Generate (compute) a transaction ID for this SIP message. |
java.util.ListIterator |
getUnrecognizedHeaders()
Get a list containing the unrecognized headers. |
java.lang.Object |
getUserObject()
|
ViaList |
getViaHeaders()
Get the Via list of headers (null if one does not exist). |
boolean |
hasContent()
Return true if this message has a body. |
boolean |
hasFromTag()
Return true if the message has a From header tag. |
boolean |
hasHeader(java.lang.String headerName)
Return true if the SIPMessage has a header of the given name. |
boolean |
hasToTag()
Return true if the message has a To header tag. |
static boolean |
isRequestHeader(SIPHeader sipHeader)
Return true if the header belongs only in a Request. |
static boolean |
isResponseHeader(SIPHeader sipHeader)
Return true if the header belongs only in a response. |
boolean |
match(java.lang.Object other)
Template match for SIP messages. |
void |
merge(java.lang.Object template)
Merge a request with a template |
void |
removeContent()
Remove the message content if it exists. |
void |
removeHeader(java.lang.String headerName)
Remove all headers given its name. |
void |
removeHeader(java.lang.String headerName,
boolean top)
Remove a header given its name. |
void |
replace(java.lang.String cText,
GenericObject newObject,
boolean matchSubstring)
Recursively replace a portion of this object with a new Object. |
void |
replace(java.lang.String cText,
GenericObjectList newObject,
boolean matchSubstring)
Recursively replace a portion of this object with a new Object. |
void |
setCallId(javax.sip.header.CallIdHeader callId)
Set the call id header. |
void |
setCallId(java.lang.String callId)
Get the CallID header (null if one does not exist) |
void |
setContent(java.lang.Object content,
javax.sip.header.ContentTypeHeader contentTypeHeader)
Set the message content after converting the given object to a String. |
void |
setContentDisposition(javax.sip.header.ContentDispositionHeader contentDispositionHeader)
Set the content disposition header. |
void |
setContentEncoding(javax.sip.header.ContentEncodingHeader contentEncodingHeader)
|
void |
setContentLanguage(javax.sip.header.ContentLanguageHeader contentLanguageHeader)
|
void |
setContentLength(javax.sip.header.ContentLengthHeader contentLength)
Set the content length header. |
void |
setCSeq(javax.sip.header.CSeqHeader cseqHeader)
Set the CSeq header. |
void |
setExpires(javax.sip.header.ExpiresHeader expiresHeader)
Set the expiresHeader |
void |
setFrom(javax.sip.header.FromHeader from)
|
void |
setFromTag(java.lang.String tag)
Set the From Tag. |
void |
setHeader(javax.sip.header.Header sipHeader)
Attach a header (replacing the original header). |
void |
setHeader(SIPHeaderList sipHeaderList)
Set the header given a list of headers. |
void |
setHeaders(java.util.List headers)
Set a header from a linked list of headers. |
void |
setMaxForwards(javax.sip.header.MaxForwardsHeader maxForwards)
Set the max forwards header. |
void |
setMessageContent(byte[] content)
Set the message content as an array of bytes. |
void |
setMessageContent(java.lang.String content)
Set the message content for this message. |
void |
setMessageContent(java.lang.String type,
java.lang.String subType,
byte[] messageContent)
Set the message content for a given type and subtype. |
void |
setMessageContent(java.lang.String type,
java.lang.String subType,
java.lang.String messageContent)
Set the message content given type and subtype. |
abstract void |
setSIPVersion(java.lang.String sipVersion)
|
void |
setSize(int size)
Set the size of all the headers. |
void |
setTo(javax.sip.header.ToHeader to)
|
void |
setToTag(java.lang.String tag)
Set the to tag. |
void |
setUserObject(java.lang.Object obj)
|
void |
setVia(java.util.List viaList)
Set A list of via headers. |
abstract java.lang.String |
toString()
|
クラス gov.nist.javax.sip.message.MessageObject から継承されたメソッド |
---|
dbgPrint, dbgPrint |
クラス gov.nist.core.GenericObject から継承されたメソッド |
---|
debugDump, getClassFromName, getMatcher, isMySubclass, replace, replace, setMatcher |
クラス java.lang.Object から継承されたメソッド |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
コンストラクタの詳細 |
---|
public SIPMessage()
メソッドの詳細 |
---|
public static boolean isRequestHeader(SIPHeader sipHeader)
sipHeader
- is the header to test.public static boolean isResponseHeader(SIPHeader sipHeader)
sipHeader
- is the header to test.public java.util.LinkedList getMessageAsEncodedStrings()
public abstract java.lang.String encodeMessage()
public abstract java.lang.String getDialogId(boolean isServerTransaction)
isServerTransaction
- is a flag that indicates whether this is
a server transaction.public boolean match(java.lang.Object other)
GenericObject
内の match
other
- is the match template to match against.
public void replace(java.lang.String cText, GenericObject newObject, boolean matchSubstring) throws java.lang.IllegalArgumentException
GenericObject
内の replace
cText
- canonical representation of object that has to be
replaced.newObject
- object that replaces the object that has the
text cTextmatchSubstring
- if true then if cText is a substring of the
encoded text of the Object then a match is flagged.
java.lang.IllegalArgumentException
- on null args and if
replacementObject does not derive from GenericObject or
GenericObjectListpublic void replace(java.lang.String cText, GenericObjectList newObject, boolean matchSubstring) throws java.lang.IllegalArgumentException
GenericObject
内の replace
cText
- canonical representation of object that has to be
replaced.newObject
- object that replaces the object that has the
text cTextmatchSubstring
- if true then flag a match if cText is a
substring of the encoded text of the object.
java.lang.IllegalArgumentException
- on null args and if
replacementObject does not derive from GenericObject or
GenericObjectListpublic void merge(java.lang.Object template)
MessageObject
内の merge
template
- -- template to merge with.public java.lang.String encode()
MessageObject
内の encode
public byte[] encodeAsBytes()
public java.lang.Object clone()
javax.sip.message.Message
内の clone
MessageObject
内の clone
public java.lang.String debugDump()
MessageObject
内の debugDump
public void setHeader(javax.sip.header.Header sipHeader)
javax.sip.message.Message
内の setHeader
sipHeader
- SIPHeader that replaces a header of the same type.public void setHeaders(java.util.List headers)
headers
- -- a list of headers to set.public void attachHeader(SIPHeader h, boolean replaceflag) throws SIPDuplicateHeaderException
h
- header to attach.replaceflag
- if true then replace a header if it exists.
SIPDuplicateHeaderException
- If replaceFlag is false and
only a singleton header is allowed (fpr example CSeq).public void attachHeader(SIPHeader header, boolean replaceFlag, boolean top) throws SIPDuplicateHeaderException
header
- Header to attach.replaceFlag
- If true then replace the existing header.top
- Location in the header list to insert the header.
SIPDuplicateHeaderException
- if the header is of a type
that cannot tolerate duplicates and one of this type already exists
(e.g. CSeq header).
java.lang.IndexOutOfBoundsException
- If the index specified is
greater than the number of headers that are in this message.public void removeHeader(java.lang.String headerName, boolean top)
headerName
- is the name of the header to remove.top
- -- flag that indicates which end of header list to process.public void removeHeader(java.lang.String headerName)
javax.sip.message.Message
内の removeHeader
headerName
- is the name of the header to remove.public java.lang.String getTransactionId()
public boolean hasContent()
public java.util.ListIterator getHeaders()
public javax.sip.header.Header getHeader(java.lang.String headerName)
javax.sip.message.Message
内の getHeader
public ContentType getContentTypeHeader()
public javax.sip.header.FromHeader getFrom()
public ErrorInfoList getErrorInfoHeaders()
public ContactList getContactHeaders()
public ViaList getViaHeaders()
public void setVia(java.util.List viaList)
viaList
- a list of via headers to add.public void setHeader(SIPHeaderList sipHeaderList)
sipHeaderList
- a headerList to setpublic Via getTopmostVia()
public javax.sip.header.CSeqHeader getCSeq()
public Authorization getAuthorization()
public javax.sip.header.MaxForwardsHeader getMaxForwards()
public void setMaxForwards(javax.sip.header.MaxForwardsHeader maxForwards)
maxForwards
- is the MaxForwardsHeader to set.public RouteList getRouteHeaders()
public javax.sip.header.CallIdHeader getCallId()
public void setCallId(javax.sip.header.CallIdHeader callId)
callId
- call idHeader (what else could it be?)public void setCallId(java.lang.String callId) throws java.text.ParseException
callId
- -- the call identifier to be assigned to the call id header
java.text.ParseException
public RecordRouteList getRecordRouteHeaders()
public javax.sip.header.ToHeader getTo()
public void setTo(javax.sip.header.ToHeader to)
public void setFrom(javax.sip.header.FromHeader from)
public javax.sip.header.ContentLengthHeader getContentLength()
javax.sip.message.Message
内の getContentLength
public java.lang.String getMessageContent() throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingException
- if the platform does not
support the charset specified in the content type header.public byte[] getRawContent()
javax.sip.message.Message
内の getRawContent
public void setMessageContent(java.lang.String type, java.lang.String subType, java.lang.String messageContent)
type
- is the message type (eg. application)subType
- is the message sybtype (eg. sdp)messageContent
- is the messge content as a string.public void setContent(java.lang.Object content, javax.sip.header.ContentTypeHeader contentTypeHeader) throws java.text.ParseException
javax.sip.message.Message
内の setContent
content
- -- content to set.contentTypeHeader
- -- content type header corresponding to
content.
java.text.ParseException
public java.lang.Object getContent()
javax.sip.message.Message
内の getContent
public void setMessageContent(java.lang.String type, java.lang.String subType, byte[] messageContent)
type
- is the messge type.subType
- is the message subType.messageContent
- is the message content as a byte array.public void setMessageContent(java.lang.String content)
content
- Message body as a string.public void setMessageContent(byte[] content)
content
- is the content of the message as an array of bytes.public void removeContent()
javax.sip.message.Message
内の removeContent
public java.util.ListIterator getHeaders(java.lang.String headerName)
javax.sip.message.Message
内の getHeaders
headerName
- is the name of the header to get.
public boolean hasHeader(java.lang.String headerName)
headerName
- is the header name for which we are testing.
public boolean hasFromTag()
public boolean hasToTag()
public java.lang.String getFromTag()
public void setFromTag(java.lang.String tag)
tag
- -- tag to set in the from header.public void setToTag(java.lang.String tag)
tag
- -- tag to set.public java.lang.String getToTag()
public abstract java.lang.String getFirstLine()
public void addHeader(javax.sip.header.Header sipHeader)
javax.sip.message.Message
内の addHeader
sipHeader
- -- sip header to add.public void addUnparsed(java.lang.String unparsed)
unparsed
- -- unparsed header to add to the list.public void addHeader(java.lang.String sipHeader)
sipHeader
- -- string version of SIP header to add.public java.util.ListIterator getUnrecognizedHeaders()
javax.sip.message.Message
内の getUnrecognizedHeaders
public java.util.ListIterator getHeaderNames()
javax.sip.message.Message
内の getHeaderNames
public boolean equals(java.lang.Object other)
javax.sip.message.Message
内の equals
GenericObject
内の equals
other
- -- the other object to compare with.
public javax.sip.header.ContentDispositionHeader getContentDisposition()
javax.sip.message.Message
内の getContentDisposition
public javax.sip.header.ContentEncodingHeader getContentEncoding()
javax.sip.message.Message
内の getContentEncoding
public javax.sip.header.ContentLanguageHeader getContentLanguage()
javax.sip.message.Message
内の getContentLanguage
public javax.sip.header.ExpiresHeader getExpires()
javax.sip.message.Message
内の getExpires
public void setExpires(javax.sip.header.ExpiresHeader expiresHeader)
javax.sip.message.Message
内の setExpires
expiresHeader
- -- the expires header to set.public void setContentDisposition(javax.sip.header.ContentDispositionHeader contentDispositionHeader)
javax.sip.message.Message
内の setContentDisposition
contentDispositionHeader
- -- content disposition header.public void setContentEncoding(javax.sip.header.ContentEncodingHeader contentEncodingHeader)
javax.sip.message.Message
内の setContentEncoding
public void setContentLanguage(javax.sip.header.ContentLanguageHeader contentLanguageHeader)
javax.sip.message.Message
内の setContentLanguage
public void setContentLength(javax.sip.header.ContentLengthHeader contentLength)
javax.sip.message.Message
内の setContentLength
contentLength
- -- content length header.public void setSize(int size)
size
- -- size of the headers.public int getSize()
public void setCSeq(javax.sip.header.CSeqHeader cseqHeader)
cseqHeader
- -- CSeq Header.public abstract void setSIPVersion(java.lang.String sipVersion) throws java.text.ParseException
javax.sip.message.Message
内の setSIPVersion
java.text.ParseException
public abstract java.lang.String getSIPVersion()
javax.sip.message.Message
内の getSIPVersion
public abstract java.lang.String toString()
javax.sip.message.Message
内の toString
java.lang.Object
内の toString
public java.lang.Object getUserObject()
javax.sip.message.Message
内の getUserObject
public void setUserObject(java.lang.Object obj)
javax.sip.message.Message
内の setUserObject
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |