|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.tinyradius.dictionary.MemoryDictionary
public class MemoryDictionary
A dictionary that keeps the values and names in hash maps
in the memory. The dictionary has to be filled using the
methods addAttributeType and
addVendor.
addAttributeType(AttributeType),
addVendor(int, String),
Dictionary,
WritableDictionary| Constructor Summary | |
|---|---|
MemoryDictionary()
|
|
| Method Summary | |
|---|---|
void |
addAttributeType(AttributeType attributeType)
Adds an AttributeType object to the cache. |
void |
addVendor(int vendorId,
java.lang.String vendorName)
Adds the given vendor to the cache. |
AttributeType |
getAttributeTypeByCode(int typeCode)
Returns the AttributeType for the vendor -1 from the cache. |
AttributeType |
getAttributeTypeByCode(int vendorCode,
int typeCode)
Returns the specified AttributeType object. |
AttributeType |
getAttributeTypeByName(java.lang.String typeName)
Retrieves the attribute type with the given name. |
int |
getVendorId(java.lang.String vendorName)
Searches the vendor with the given name and returns its code. |
java.lang.String |
getVendorName(int vendorId)
Retrieves the name of the vendor with the given code from the cache. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MemoryDictionary()
| Method Detail |
|---|
public AttributeType getAttributeTypeByCode(int typeCode)
getAttributeTypeByCode in interface DictionarytypeCode - attribute type code
Dictionary.getAttributeTypeByCode(int)
public AttributeType getAttributeTypeByCode(int vendorCode,
int typeCode)
getAttributeTypeByCode in interface DictionaryvendorCode - vendor ID or -1 for "no vendor"typeCode - attribute type code
Dictionary.getAttributeTypeByCode(int, int)public AttributeType getAttributeTypeByName(java.lang.String typeName)
getAttributeTypeByName in interface DictionarytypeName - name of the attribute type
Dictionary.getAttributeTypeByName(java.lang.String)public int getVendorId(java.lang.String vendorName)
getVendorId in interface DictionaryvendorName - vendor name
Dictionary.getVendorId(java.lang.String)public java.lang.String getVendorName(int vendorId)
getVendorName in interface DictionaryvendorId - vendor number
Dictionary.getVendorName(int)
public void addVendor(int vendorId,
java.lang.String vendorName)
addVendor in interface WritableDictionaryvendorId - vendor IDvendorName - name of the vendor
java.lang.IllegalArgumentException - empty vendor name, invalid vendor IDpublic void addAttributeType(AttributeType attributeType)
addAttributeType in interface WritableDictionaryattributeType - AttributeType object
java.lang.IllegalArgumentException - duplicate attribute name/type code
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||