public interface MessageBody extends GroupedAvp
7.2.103 Message-Body AVP The Message-Body AVP (AVP Code 889) is of type Grouped AVP and holds information about the message bodies including user-to-user data. It has the following ABNF grammar: Message-Body ::= < AVP Header: 889 > { Content-Type } { Content-Length } [ Content-Disposition ] [ Originator ] The message bodies shall not include the bodies' of Content-Type = "application-sdp" as these are captured in other AVPs.Note:
FLAG_RULE_MAY, FLAG_RULE_MUST, FLAG_RULE_MUSTNOT
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getContentDisposition()
Returns the value of the Content-Disposition AVP, of type UTF8String.
|
long |
getContentLength()
Returns the value of the Content-Length AVP, of type Unsigned32.
|
java.lang.String |
getContentType()
Returns the value of the Content-Type AVP, of type UTF8String.
|
DiameterAvp[] |
getExtensionAvps()
Returns the set of extension AVPs.
|
Originator |
getOriginator()
Returns the value of the Originator AVP, of type Enumerated.
|
boolean |
hasContentDisposition()
Returns true if the Content-Disposition AVP is present in the Message-Body AVP.
|
boolean |
hasContentLength()
Returns true if the Content-Length AVP is present in the Message-Body AVP.
|
boolean |
hasContentType()
Returns true if the Content-Type AVP is present in the Message-Body AVP.
|
boolean |
hasOriginator()
Returns true if the Originator AVP is present in the Message-Body AVP.
|
void |
removeContentDisposition()
Removes the Content-Disposition AVP from the Message-Body AVP.
|
void |
removeContentLength()
Removes the Content-Length AVP from the Message-Body AVP.
|
void |
removeContentType()
Removes the Content-Type AVP from the Message-Body AVP.
|
void |
removeExtensionAvps()
Removes all extension AVPs from the Message-Body AVP.
|
void |
removeOriginator()
Removes the Originator AVP from the Message-Body AVP.
|
void |
setContentDisposition(java.lang.String contentDisposition)
Sets the value of the Content-Disposition AVP, of type UTF8String.
|
void |
setContentLength(long contentLength)
Sets the value of the Content-Length AVP, of type Unsigned32.
|
void |
setContentType(java.lang.String contentType)
Sets the value of the Content-Type AVP, of type UTF8String.
|
void |
setExtensionAvps(DiameterAvp[] avps)
Sets the set of extension AVPs with all the values in the given array.
|
void |
setOriginator(Originator originator)
Sets the value of the Originator AVP, of type Enumerated.
|
byteArrayValue, clone, doubleValue, floatValue, getCode, getMandatoryRule, getName, getProtectedRule, getType, getVendorID, groupedAvpValue, intValue, longValue, stringValue
boolean hasContentType()
java.lang.String getContentType()
void setContentType(java.lang.String contentType)
java.lang.NullPointerException
- if contentType
is null
.void removeContentType()
boolean hasContentLength()
long getContentLength()
hasContentLength()
to check the existence of this AVP.java.lang.IllegalStateException
- if the Content-Length AVP has not been set.void setContentLength(long contentLength)
void removeContentLength()
boolean hasContentDisposition()
java.lang.String getContentDisposition()
void setContentDisposition(java.lang.String contentDisposition)
java.lang.NullPointerException
- if contentDisposition
is null
.void removeContentDisposition()
boolean hasOriginator()
Originator getOriginator()
void setOriginator(Originator originator)
java.lang.NullPointerException
- if originator
is null
.void removeOriginator()
DiameterAvp[] getExtensionAvps()
void setExtensionAvps(DiameterAvp[] avps) throws AvpNotAllowedException
AvpNotAllowedException
- if an AVP is encountered of a type already known to this class
(i.e. an AVP for which get/set methods already appear in this class)java.lang.NullPointerException
- if avps
is null
.void removeExtensionAvps()