Class QualityOfServiceUtils


  • public class QualityOfServiceUtils
    extends Object
    Utilities for determining the values for the bits in the headers of the outgoing TCP/IP packets that indicate Traffic Class for use in Quality of Service forwarding policies.
    • Constructor Detail

      • QualityOfServiceUtils

        public QualityOfServiceUtils()
    • Method Detail

      • getDSCP

        public static int getDSCP​(String value)
                           throws IllegalArgumentException
        Parameters:
        value - A potential value to be used for Differentiated Services.
        Returns:
        The corresponding Differentiated Services Code Point (DSCP).
        Throws:
        IllegalArgumentException - if the value does not correspond to a Differentiated Services Code Point or setting the DSCP is not supported.
      • getToS

        public static int getToS​(int value)
                          throws IllegalArgumentException
        Parameters:
        value - A potential value to be used for Type of Service.
        Returns:
        A valid value that can be used to set the Type of Service in the packet headers.
        Throws:
        IllegalArgumentException - if the value is not a legal Type of Service value.