Class BasicHeader

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String name  
      private boolean sensitive  
      private static long serialVersionUID  
      private java.lang.String value  
    • Constructor Summary

      Constructors 
      Constructor Description
      BasicHeader​(java.lang.String name, java.lang.Object value)
      Default constructor
      BasicHeader​(java.lang.String name, java.lang.Object value, boolean sensitive)
      Constructor with sensitivity flag
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      BasicHeader clone()  
      java.lang.String getName()
      Gets the name of this pair.
      java.lang.String getValue()
      Gets the value of this pair.
      boolean isSensitive()
      Returns true if the header should be considered sensitive.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • name

        private final java.lang.String name
      • sensitive

        private final boolean sensitive
      • value

        private final java.lang.String value
    • Constructor Detail

      • BasicHeader

        public BasicHeader​(java.lang.String name,
                           java.lang.Object value)
        Default constructor
        Parameters:
        name - the header name
        value - the header value, taken as the value's toString().
      • BasicHeader

        public BasicHeader​(java.lang.String name,
                           java.lang.Object value,
                           boolean sensitive)
        Constructor with sensitivity flag
        Parameters:
        name - the header name
        value - the header value, taken as the value's toString().
        sensitive - sensitive flag
        Since:
        5.0
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from interface: NameValuePair
        Gets the name of this pair.
        Specified by:
        getName in interface NameValuePair
        Returns:
        the name of this pair, never null.
      • getValue

        public java.lang.String getValue()
        Description copied from interface: NameValuePair
        Gets the value of this pair.
        Specified by:
        getValue in interface NameValuePair
        Returns:
        the value of this pair, may be null.
      • isSensitive

        public boolean isSensitive()
        Description copied from interface: Header
        Returns true if the header should be considered sensitive.

        Some encoding schemes such as HPACK impose restrictions on encoded representation of sensitive headers.

        Specified by:
        isSensitive in interface Header
        Returns:
        true if the header should be considered sensitive.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • clone

        public BasicHeader clone()
                          throws java.lang.CloneNotSupportedException
        Overrides:
        clone in class java.lang.Object
        Throws:
        java.lang.CloneNotSupportedException