|
RADIUS Client API (V3) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectAttributeName
Class to find attribute names from field names in classes. This is used to display attribute names in dumping attribute names and values, in particular within Attribute.toString() and VendorSpecific.toString(), and implicitly in AttributeList.toString().
| Field Summary | |
static int |
UNKNOWN_VENDOR
Return value from AttributeName#getVendor() if
no vendor name can be found - -1. |
| Constructor Summary | |
AttributeName()
Default constructor. |
|
| Method Summary | |
static void |
add(String className,
int vendorId)
Add a class name to the class search list as a Vendor-Specific Attributes (VSA's). |
static void |
addDictionary(RADIUSDictionary dict)
Add a dictionary. |
static String |
getVendor(int vendorId)
Get the vendor name from the Vendor ID. |
static int |
getVendor(String name)
Extract the vendor Id given the name. |
static String |
lookup(int type)
Lookup the field name from an attribute type. |
static String |
lookup(int vendorId,
int type)
Lookup the field name from a Vendor-Specific attribute type. |
static int |
lookup(int vendorId,
String attributeName)
Lookup the tag number from an attribute name. |
static int |
lookup(String attributeName)
Lookup the tag number from an attribute name. |
static void |
main(String[] args)
Small test looking up attributes. |
| Methods inherited from class Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int UNKNOWN_VENDOR
AttributeName#getVendor() if
no vendor name can be found - -1.
| Constructor Detail |
public AttributeName()
| Method Detail |
public static void main(String[] args)
public static void add(String className,
int vendorId)
className - Fully qualified class name.vendorId - Vendor ID for VSA's, 0 for Attributes types.
This should be executed before using the .toString() methods in AttributeList, Attribute, or VendorSpecific.
new AttributeName().add("com.myco.MyVendor", com.myco.MyVendor.vendorId);
public static void addDictionary(RADIUSDictionary dict)
dict - Dictionary.public static String getVendor(int vendorId)
vendorId - Vendor ID.
public static int getVendor(String name)
name - Vendor name.
UNKNOWN_VENDOR if a vendor cannot be found.public static String lookup(int type)
type - Attribute type.
public static String lookup(int vendorId,
int type)
A vendorId value of 0 performs a look up on the basic RADIUS attributes. E.g. lookup(0, 2) yields "User-Password" and lookup(Microsoft.VENDORID, 2) returns "MS-CHAP-Error".
vendorId - Vendor ID.type - Attribute type, like Attribute.User-Name.
public static int lookup(int vendorId,
String attributeName)
A vendorId value of 0 performs a look up on the basic RADIUS attributes. E.g. lookup(0, "User-Password") yields 2 and lookup(Microsoft.VENDORID, "MS-CHAP-Error") returns 2.
vendorId - Vendor number.attributeName - Attribute name.
public static int lookup(String attributeName)
attributeName - Attribute name.
|
RADIUS Client API (V3) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||