Class RADIUSAttribute


  • public class RADIUSAttribute
    extends java.lang.Object
    An attribute in a RADIUS packet.
    • Field Detail

      • type

        protected byte type
      • length

        protected byte length
      • value

        protected byte[] value
      • RADIUS_ATTR_FRAMED_MTU

        public static final byte RADIUS_ATTR_FRAMED_MTU
        See Also:
        Constant Field Values
      • RADIUS_ATTR_VENDOR_SPECIFIC

        public static final byte RADIUS_ATTR_VENDOR_SPECIFIC
        See Also:
        Constant Field Values
      • RADIUS_ATTR_CALLING_STATION_ID

        public static final byte RADIUS_ATTR_CALLING_STATION_ID
        See Also:
        Constant Field Values
      • RADIUS_ATTR_ACCT_SESSION_ID

        public static final byte RADIUS_ATTR_ACCT_SESSION_ID
        See Also:
        Constant Field Values
      • RADIUS_ATTR_NAS_PORT_TYPE

        public static final byte RADIUS_ATTR_NAS_PORT_TYPE
        See Also:
        Constant Field Values
      • RADIUS_ATTR_EAP_MESSAGE

        public static final byte RADIUS_ATTR_EAP_MESSAGE
        See Also:
        Constant Field Values
      • RADIUS_ATTR_MESSAGE_AUTH

        public static final byte RADIUS_ATTR_MESSAGE_AUTH
        See Also:
        Constant Field Values
      • RADIUS_ATTR_NAS_PORT_ID

        public static final byte RADIUS_ATTR_NAS_PORT_ID
        See Also:
        Constant Field Values
    • Constructor Detail

      • RADIUSAttribute

        public RADIUSAttribute()
        Default constructor.
      • RADIUSAttribute

        public RADIUSAttribute​(byte type,
                               byte length,
                               byte[] value)
        Constructs a RADIUS attribute with the give type, length and value.
        Parameters:
        type - type
        length - length
        value - value
    • Method Detail

      • isValidType

        public boolean isValidType()
        Checks if the attribute type is valid.
        Returns:
        whether the type is valid or not
      • getType

        public byte getType()
        Gets the attribute type.
        Returns:
        the type
      • setType

        public RADIUSAttribute setType​(byte type)
        Sets the attribute type.
        Parameters:
        type - the code to set
        Returns:
        this
      • getLength

        public byte getLength()
        Gets the attribute length.
        Returns:
        the length
      • setLength

        public RADIUSAttribute setLength​(byte length)
        Sets the attribute length.
        Parameters:
        length - the length to set
        Returns:
        this
      • getValue

        public byte[] getValue()
        Gets the attribute value.
        Returns:
        the value
      • setValue

        public RADIUSAttribute setValue​(byte[] value)
        Sets the attribute value.
        Parameters:
        value - the data to set
        Returns:
        this
      • toString

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