Class AttrAccept

java.lang.Object
org.igniterealtime.jbosh.AbstractAttr<String>
org.igniterealtime.jbosh.AttrAccept
All Implemented Interfaces:
Comparable

final class AttrAccept extends AbstractAttr<String>
Data type representing the getValue of the accept attribute of the bosh element.
  • Field Details

    • encodings

      private final String[] encodings
      Array of the accepted encodings.
  • Constructor Details

    • AttrAccept

      private AttrAccept(String val)
      Creates a new attribute object.
      Parameters:
      val - attribute getValue
      Throws:
      BOSHException - on parse or validation failure
  • Method Details

    • createFromString

      static AttrAccept createFromString(String str) throws BOSHException
      Creates a new attribute instance from the provided String.
      Parameters:
      str - string representation of the attribute
      Returns:
      attribute instance or null if provided string is null
      Throws:
      BOSHException - on parse or validation failure
    • isAccepted

      boolean isAccepted(String name)
      Determines whether or not the specified encoding is supported.
      Parameters:
      name - encoding name