public final class AttributeFactory extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
AttributeFactory.AttributeFactoryPool |
static class |
AttributeFactory.VendorValue |
| Constructor and Description |
|---|
AttributeFactory() |
| Modifier and Type | Method and Description |
|---|---|
static int |
addToAttributeList(AttributeList list,
long type,
byte[] value,
boolean pool) |
static byte[] |
assembleAttributeList(AttributeList list,
long type) |
static RadiusAttribute |
attributeFromString(String src)
Parses a string to create a RadiusAttribute.
|
static RadiusAttribute |
borrow(Long key) |
static RadiusAttribute |
copyAttribute(RadiusAttribute a) |
static RadiusAttribute |
copyAttribute(RadiusAttribute a,
boolean pool) |
static LinkedHashMap<Long,Class<?>> |
getAttributeMap() |
static LinkedHashMap<String,Class<?>> |
getAttributeNameMap() |
static String |
getPoolStatus() |
static long |
getTypeByName(String aName)
The the integer type of a RadiusAttribute by name
|
static LinkedHashMap<Long,Class<?>> |
getVendorMap() |
static LinkedHashMap<Long,AttributeFactory.VendorValue> |
getVendorValueMap() |
static boolean |
loadAttributeDictionary(AttributeDictionary dict) |
static boolean |
loadAttributeDictionary(String className)
Load an attribute dictionary
|
static void |
loadAttributesFromString(AttributeList list,
String src,
String delim,
boolean beStrinct) |
static RadiusAttribute |
newAttribute(AttributeDescription desc)
Create a new RadiusAttribute based on a AttributeDescription
|
static RadiusAttribute |
newAttribute(Long key) |
static RadiusAttribute |
newAttribute(long type,
byte[] value,
boolean pool)
Creates a new RadiusAttribute
|
static RadiusAttribute |
newAttribute(long vendor,
long type,
byte[] value,
int op,
boolean pool)
Creates a new RadiusAttribute
|
static RadiusAttribute |
newAttribute(long vendor,
long type,
long len,
int op,
ByteBuffer buffer,
boolean pool) |
static RadiusAttribute |
newAttribute(Long key,
Serializable value,
boolean pool) |
static RadiusAttribute |
newAttribute(String aName)
Create a RadiusAttribute by name
|
static RadiusAttribute |
newAttribute(String aName,
String aValue,
String aOp)
Creates a new RadiusAttribute
|
static AttributeList |
newAttributeList(long type,
byte[] value,
boolean pool) |
static void |
poolStatus() |
static void |
recycle(AttributeList list) |
static void |
recycle(RadiusAttribute a) |
public static RadiusAttribute newAttribute(Long key) throws Exception
Exceptionpublic static RadiusAttribute newAttribute(Long key, Serializable value, boolean pool)
public static RadiusAttribute copyAttribute(RadiusAttribute a)
public static RadiusAttribute copyAttribute(RadiusAttribute a, boolean pool)
public static RadiusAttribute borrow(Long key) throws NoSuchElementException, IllegalStateException, Exception
public static boolean loadAttributeDictionary(String className)
className - Name of the Java Class derived from AttributeDictionarypublic static boolean loadAttributeDictionary(AttributeDictionary dict)
public static RadiusAttribute attributeFromString(String src) throws RadiusException, UnknownAttributeException
src - The source StringRadiusExceptionUnknownAttributeExceptionpublic static void loadAttributesFromString(AttributeList list, String src, String delim, boolean beStrinct) throws RadiusException
RadiusExceptionpublic static RadiusAttribute newAttribute(long vendor, long type, byte[] value, int op, boolean pool)
vendor - The VendorID of the attribute (if one)type - The Attribute Typevalue - The Attribute Valueop - The Attribute Operatorpublic static RadiusAttribute newAttribute(long vendor, long type, long len, int op, ByteBuffer buffer, boolean pool)
public static RadiusAttribute newAttribute(long type, byte[] value, boolean pool)
type - The type of the attributevalue - The value of the attributepublic static AttributeList newAttributeList(long type, byte[] value, boolean pool)
type - The type of the attributevalue - The value of the attributepublic static int addToAttributeList(AttributeList list, long type, byte[] value, boolean pool)
list - The AttributeList to add totype - The type of the attributevalue - The value of the attributepublic static byte[] assembleAttributeList(AttributeList list, long type)
public static RadiusAttribute newAttribute(String aName) throws UnknownAttributeException
aName - The name of the attribute to createUnknownAttributeExceptionpublic static RadiusAttribute newAttribute(AttributeDescription desc) throws UnknownAttributeException
desc - The RadiusDescriptionUnknownAttributeExceptionpublic static RadiusAttribute newAttribute(String aName, String aValue, String aOp) throws UnknownAttributeException
aName - The name of the attribute to createaValue - The value of the attributeaOp - The "operator" of the attributeUnknownAttributeExceptionpublic static long getTypeByName(String aName) throws UnknownAttributeException
aName - The name of the attributeUnknownAttributeExceptionpublic static LinkedHashMap<Long,Class<?>> getAttributeMap()
public static LinkedHashMap<String,Class<?>> getAttributeNameMap()
public static LinkedHashMap<Long,Class<?>> getVendorMap()
public static LinkedHashMap<Long,AttributeFactory.VendorValue> getVendorValueMap()
public static void poolStatus()
public static String getPoolStatus()
public static void recycle(RadiusAttribute a)
public static void recycle(AttributeList list)
Copyright © 2017. All rights reserved.