Class HeadersByLeg


  • public class HeadersByLeg
    extends java.lang.Object
    Stores per-Leg header values. Use HeadersByLegCodec when storing in a CMP field.
    • Constructor Summary

      Constructors 
      Constructor Description
      HeadersByLeg()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addHeaderForLeg​(java.lang.String legName, java.lang.String headerName, java.lang.String headerValue)
      Add a header value to a particular leg, retaining existing values, if any
      void copyLegValues​(java.lang.String fromLeg, java.lang.String toLeg)
      Copies the headers associated with fromLeg and associates them with toLeg.
      java.lang.String getHeaderValueForLeg​(java.lang.String legName, java.lang.String headerName)
      Get a leg's header value.
      java.util.List<java.lang.String> getHeaderValuesForLeg​(java.lang.String legName, java.lang.String headerName)
      Get a leg's header values.
      void setHeaderForLeg​(java.lang.String legName, java.lang.String headerName, java.lang.String headerValue)
      Set the header value for a particular leg.
      void setHeadersForLeg​(java.lang.String legName, java.lang.String headerName, java.lang.Iterable<java.lang.String> headerValues)
      Set multiple header values for a particular leg.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • P_ACCESS_NETWORK_INFO

        public static final java.lang.String P_ACCESS_NETWORK_INFO
        See Also:
        Constant Field Values
      • OC_TERM_P_ACCESS_NETWORK_INFO

        public static final java.lang.String OC_TERM_P_ACCESS_NETWORK_INFO
        See Also:
        Constant Field Values
      • P_CHARGING_VECTOR

        public static final java.lang.String P_CHARGING_VECTOR
        See Also:
        Constant Field Values
      • P_VISITED_NETWORK_ID

        public static final java.lang.String P_VISITED_NETWORK_ID
        See Also:
        Constant Field Values
      • OC_TERM_P_VISITED_NETWORK_ID

        public static final java.lang.String OC_TERM_P_VISITED_NETWORK_ID
        See Also:
        Constant Field Values
      • CELLULAR_NETWORK_INFO

        public static final java.lang.String CELLULAR_NETWORK_INFO
        See Also:
        Constant Field Values
      • P_CELLULAR_NETWORK_INFO

        public static final java.lang.String P_CELLULAR_NETWORK_INFO
        See Also:
        Constant Field Values
    • Constructor Detail

      • HeadersByLeg

        public HeadersByLeg()
    • Method Detail

      • setHeaderForLeg

        public void setHeaderForLeg​(java.lang.String legName,
                                    java.lang.String headerName,
                                    java.lang.String headerValue)
        Set the header value for a particular leg. Replaces the existing header value, if any.
        Parameters:
        legName - the leg name the header is associated with
        headerName - the header name
        headerValue - the header value
      • setHeadersForLeg

        public void setHeadersForLeg​(java.lang.String legName,
                                     java.lang.String headerName,
                                     java.lang.Iterable<java.lang.String> headerValues)
        Set multiple header values for a particular leg. Replaces the existing values, if any.
        Parameters:
        legName - the leg name the header is associated with
        headerName - the header name
        headerValues - the header values
      • addHeaderForLeg

        public void addHeaderForLeg​(java.lang.String legName,
                                    java.lang.String headerName,
                                    java.lang.String headerValue)
        Add a header value to a particular leg, retaining existing values, if any
        Parameters:
        legName - the leg name the header is associated with
        headerName - the header name
        headerValue - the new header value
      • getHeaderValueForLeg

        public java.lang.String getHeaderValueForLeg​(java.lang.String legName,
                                                     java.lang.String headerName)
        Get a leg's header value.
        Parameters:
        legName - the leg name the header is associated with
        headerName - the header name
        Returns:
        the header value, or null if no header values have been set. If multiple header values are present, this method returns the first value that was added.
      • getHeaderValuesForLeg

        public java.util.List<java.lang.String> getHeaderValuesForLeg​(java.lang.String legName,
                                                                      java.lang.String headerName)
        Get a leg's header values.
        Parameters:
        legName - the leg name the header is associated with
        headerName - the header name
        Returns:
        an immutable list of header values, empty if no header values have been set. Header values are returned in the order they were added.
      • copyLegValues

        public void copyLegValues​(java.lang.String fromLeg,
                                  java.lang.String toLeg)
        Copies the headers associated with fromLeg and associates them with toLeg. Replaces existing values, if any.
        Parameters:
        fromLeg - leg name to copy header values from
        toLeg - leg name to copy header values to
      • toString

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