Class PayloadType
java.lang.Object
org.jivesoftware.smackx.jingleold.media.PayloadType
- Direct Known Subclasses:
PayloadType.Audio
Represents a payload type.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.PayloadType(int id, String name) Constructor with Id and name.PayloadType(int id, String name, int channels) Constructor with Id, name and number of channels.Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanintGet the number of channels used by this payload type.protected Stringstatic StringReturns the XML element name of the element.intgetId()Get the ID.getName()Get the printable name.inthashCode()booleanisNull()Return true if the Payload type is not valid.voidsetChannels(int channels) Set the number of channels for a payload type.voidsetId(int id) Set the ID.voidSet the printable name.toXML()
-
Field Details
-
NODENAME
- See Also:
-
MAX_FIXED_PT
public static int MAX_FIXED_PT -
INVALID_PT
public static int INVALID_PT
-
-
Constructor Details
-
PayloadType
Constructor with Id, name and number of channels.- Parameters:
id- The identifiername- A namechannels- The number of channels
-
PayloadType
public PayloadType()Default constructor. -
PayloadType
Constructor with Id and name.- Parameters:
id- The identificationname- A name
-
PayloadType
Copy constructor.- Parameters:
pt- The other payload type.
-
-
Method Details
-
getId
public int getId()Get the ID.- Returns:
- the ID
-
setId
public void setId(int id) Set the ID.- Parameters:
id- ID
-
getName
Get the printable name.- Returns:
- printable name for the payload type
-
setName
Set the printable name.- Parameters:
name- the printable name
-
getChannels
public int getChannels()Get the number of channels used by this payload type.- Returns:
- the number of channels
-
setChannels
public void setChannels(int channels) Set the number of channels for a payload type.- Parameters:
channels- The number of channels
-
isNull
public boolean isNull()Return true if the Payload type is not valid.- Returns:
- true if the payload type is invalid
-
hashCode
public int hashCode() -
equals
-
getElementName
Returns the XML element name of the element.- Returns:
- the XML element name of the element.
-
toXML
-
getChildAttributes
-