Class PayloadType

java.lang.Object
org.jivesoftware.smackx.jingleold.media.PayloadType
Direct Known Subclasses:
PayloadType.Audio

public class PayloadType extends Object
Represents a payload type.
  • Field Details

  • Constructor Details

    • PayloadType

      public PayloadType(int id, String name, int channels)
      Constructor with Id, name and number of channels.
      Parameters:
      id - The identifier
      name - A name
      channels - The number of channels
    • PayloadType

      public PayloadType()
      Default constructor.
    • PayloadType

      public PayloadType(int id, String name)
      Constructor with Id and name.
      Parameters:
      id - The identification
      name - 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

      public String getName()
      Get the printable name.
      Returns:
      printable name for the payload type
    • setName

      public void setName(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 class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • getElementName

      public static String getElementName()
      Returns the XML element name of the element.
      Returns:
      the XML element name of the element.
    • toXML

      public String toXML()
    • getChildAttributes