org.tinyradius.dictionary
Interface Dictionary

All Known Subinterfaces:
WritableDictionary
All Known Implementing Classes:
DefaultDictionary, MemoryDictionary

public interface Dictionary

A dictionary retrieves AttributeType objects by name or type code.


Method Summary
 AttributeType getAttributeTypeByCode(int typeCode)
          Retrieves an attribute type by type code.
 AttributeType getAttributeTypeByCode(int vendorId, int typeCode)
          Retrieves an attribute type for a vendor-specific attribute.
 AttributeType getAttributeTypeByName(java.lang.String typeName)
          Retrieves an attribute type by name.
 int getVendorId(java.lang.String vendorName)
          Retrieves the ID of the vendor with the given name.
 java.lang.String getVendorName(int vendorId)
          Retrieves the name of the vendor with the given vendor code.
 

Method Detail

getAttributeTypeByName

AttributeType getAttributeTypeByName(java.lang.String typeName)
Retrieves an attribute type by name. This includes vendor-specific attribute types whose name is prefixed by the vendor name.

Parameters:
typeName - name of the attribute type
Returns:
AttributeType object or null

getAttributeTypeByCode

AttributeType getAttributeTypeByCode(int typeCode)
Retrieves an attribute type by type code. This method does not retrieve vendor specific attribute types.

Parameters:
typeCode - type code, 1-255
Returns:
AttributeType object or null

getAttributeTypeByCode

AttributeType getAttributeTypeByCode(int vendorId,
                                     int typeCode)
Retrieves an attribute type for a vendor-specific attribute.

Parameters:
vendorId - vendor ID
typeCode - type code, 1-255
Returns:
AttributeType object or null

getVendorName

java.lang.String getVendorName(int vendorId)
Retrieves the name of the vendor with the given vendor code.

Parameters:
vendorId - vendor number
Returns:
vendor name or null

getVendorId

int getVendorId(java.lang.String vendorName)
Retrieves the ID of the vendor with the given name.

Parameters:
vendorName - name of the vendor
Returns:
vendor ID or -1