Interface Dictionary

All Superinterfaces:
CoreDictionary
All Known Subinterfaces:
WritableDictionary
All Known Implementing Classes:
MemoryDictionary

public interface Dictionary
extends CoreDictionary
A dictionary retrieves AttributeTemplate objects by name or attribute ID.
  • Method Details

    • createAttribute

      default RadiusAttribute createAttribute​(int vendorId, int type, byte[] value)
      Creates a RadiusAttribute object of the appropriate type by looking up type and vendorId.
      Parameters:
      vendorId - vendor ID or -1
      type - attribute type
      value - attribute data as byte array
      Returns:
      RadiusAttribute object
    • createAttribute

      default RadiusAttribute createAttribute​(int vendorId, int type, byte tag, byte[] value)
      Creates a RadiusAttribute object of the appropriate type by looking up type and vendorId.
      Parameters:
      vendorId - vendor ID or -1
      type - attribute type
      tag - tag as per RFC2868, nullable, ignored if not supported by attribute
      value - attribute data as byte array
      Returns:
      RadiusAttribute object
    • createAttribute

      default RadiusAttribute createAttribute​(int vendorId, int type, java.lang.String value)
      Creates a RadiusAttribute object of the appropriate type by looking up type and vendorId.
      Parameters:
      vendorId - vendor ID or -1
      type - attribute type
      value - attribute data as String
      Returns:
      RadiusAttribute object
    • createAttribute

      default RadiusAttribute createAttribute​(int vendorId, int type, byte tag, java.lang.String value)
      Creates a RadiusAttribute object of the appropriate type by looking up type and vendorId.
      Parameters:
      vendorId - vendor ID or -1
      type - attribute type
      tag - tag as per RFC2868, nullable, ignored if not supported by attribute
      value - attribute data as String
      Returns:
      RadiusAttribute object
    • createAttribute

      default RadiusAttribute createAttribute​(java.lang.String name, java.lang.String value)
      Convenience method to create a Radius attribute.

      Uses AttributeTemplate to lookup the type code and parses String value depending on the type.

      If attribute has tag field, will be set to 0x00.

      Parameters:
      name - name of the attribute, for example "NAS-IP-Address", should NOT be 'Vendor-Specific'
      value - value of the attribute, for example "127.0.0.1"
      Returns:
      RadiusAttribute object
    • parseAttribute

      default RadiusAttribute parseAttribute​(int vendorId, int type, byte[] rawData)
      Creates a RadiusAttribute object of the appropriate type by looking up type and vendorId.
      Parameters:
      vendorId - vendor ID or -1
      type - attribute type
      rawData - attribute data to parse excl. type/length
      Returns:
      RadiusAttribute object