Class PayloadType
- java.lang.Object
-
- org.jivesoftware.smackx.jingleold.media.PayloadType
-
- Direct Known Subclasses:
PayloadType.Audio
public class PayloadType extends java.lang.Object
Represents a payload type.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PayloadType.Audio
Audio payload type.
-
Field Summary
Fields Modifier and Type Field Description static int
INVALID_PT
static int
MAX_FIXED_PT
static java.lang.String
NODENAME
-
Constructor Summary
Constructors Constructor Description PayloadType()
Default constructor.PayloadType(int id, java.lang.String name)
Constructor with Id and name.PayloadType(int id, java.lang.String name, int channels)
Constructor with Id, name and number of channels.PayloadType(PayloadType pt)
Copy constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object obj)
int
getChannels()
Get the number of channels used by this payload type.protected java.lang.String
getChildAttributes()
static java.lang.String
getElementName()
Returns the XML element name of the element.int
getId()
Get the ID.java.lang.String
getName()
Get the printable name.int
hashCode()
boolean
isNull()
Return true if the Payload type is not valid.void
setChannels(int channels)
Set the number of channels for a payload type.void
setId(int id)
Set the ID.void
setName(java.lang.String name)
Set the printable name.java.lang.String
toXML()
-
-
-
Field Detail
-
NODENAME
public static final java.lang.String NODENAME
- See Also:
- Constant Field Values
-
MAX_FIXED_PT
public static int MAX_FIXED_PT
-
INVALID_PT
public static int INVALID_PT
-
-
Constructor Detail
-
PayloadType
public PayloadType(int id, java.lang.String name, int channels)
Constructor with Id, name and number of channels.- Parameters:
id
- The identifiername
- A namechannels
- The number of channels
-
PayloadType
public PayloadType()
Default constructor.
-
PayloadType
public PayloadType(int id, java.lang.String name)
Constructor with Id and name.- Parameters:
id
- The identificationname
- A name
-
PayloadType
public PayloadType(PayloadType pt)
Copy constructor.- Parameters:
pt
- The other payload type.
-
-
Method Detail
-
getId
public int getId()
Get the ID.- Returns:
- the ID
-
setId
public void setId(int id)
Set the ID.- Parameters:
id
- ID
-
getName
public java.lang.String getName()
Get the printable name.- Returns:
- printable name for the payload type
-
setName
public void setName(java.lang.String name)
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()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
getElementName
public static java.lang.String getElementName()
Returns the XML element name of the element.- Returns:
- the XML element name of the element.
-
toXML
public java.lang.String toXML()
-
getChildAttributes
protected java.lang.String getChildAttributes()
-
-