NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

javax.sdp
Interface Attribute

All Superinterfaces:
Cloneable, Field, Serializable
All Known Implementing Classes:
AttributeField

public interface Attribute
extends Field

An Attribute represents an a= fields contained within either a MediaDescription or a SessionDescription. An Attribute can be just an identity/name or a name-value pair. Here are some examples: a=recvonly identifies a rcvonly attribute with just a name a=rtpmap:0 PCMU/8000 identifies the media format 0 has having the value PCMU/8000. If a value is present, it must be preceeded by the : character.

Version:
1.0
Author:
deruelle

Method Summary
 String getName()
          Returns the name of this attribute
 String getValue()
          Returns the value of this attribute.
 boolean hasValue()
          Determines if this attribute has an associated value.
 void setName(String name)
          Sets the id of this attribute.
 void setValue(String value)
          Sets the value of this attribute.
 
Methods inherited from interface javax.sdp.Field
clone, getTypeChar
 

Method Detail

getName

String getName()
               throws SdpParseException
Returns the name of this attribute

Returns:
a String identity.
Throws:
SdpParseException - if the name is not well formatted.

setName

void setName(String name)
             throws SdpException
Sets the id of this attribute.

Parameters:
name - the string name/id of the attribute.
Throws:
SdpException - if the name is null

hasValue

boolean hasValue()
                 throws SdpParseException
Determines if this attribute has an associated value.

Returns:
true if the attribute has a value.
Throws:
SdpParseException - if the value is not well formatted.

getValue

String getValue()
                throws SdpParseException
Returns the value of this attribute.

Returns:
the value; null if the attribute has no associated value.
Throws:
SdpParseException - if the value is not well formatted.

setValue

void setValue(String value)
              throws SdpException
Sets the value of this attribute.

Parameters:
value - the - attribute value
Throws:
SdpException - if the value is null.

NIST-SIP: The Reference Implementation for JAIN-SIP 1.2

A product of the NIST/ITL Advanced Networking Technologies Division.
See conditions of use.
Submit a bug report or feature request.