|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jradius.packet.attribute.AttributeFactory
public final class AttributeFactory
The Attribute Factor. This factor builds the RADIUS attributes based on configured dictionaries.
Nested Class Summary | |
---|---|
static class |
AttributeFactory.VendorValue
|
Constructor Summary | |
---|---|
AttributeFactory()
|
Method Summary | |
---|---|
static int |
addToAttributeList(AttributeList list,
long type,
byte[] value)
|
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 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)
Creates a new RadiusAttribute |
static RadiusAttribute |
newAttribute(long vendor,
long type,
byte[] value,
int op)
Creates a new RadiusAttribute |
static RadiusAttribute |
newAttribute(long vendor,
long type,
long len,
int op,
ByteBuffer buffer)
|
static RadiusAttribute |
newAttribute(Long key,
Serializable value)
|
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)
|
static void |
poolStatus()
|
static void |
recycle(AttributeList list)
|
static void |
recycle(RadiusAttribute a)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AttributeFactory()
Method Detail |
---|
public static RadiusAttribute newAttribute(Long key) throws Exception
Exception
public static RadiusAttribute newAttribute(Long key, Serializable value)
public static RadiusAttribute copyAttribute(RadiusAttribute a)
public static RadiusAttribute borrow(Long key) throws NoSuchElementException, IllegalStateException, Exception
NoSuchElementException
IllegalStateException
Exception
public static boolean loadAttributeDictionary(String className)
className
- Name of the Java Class derived from AttributeDictionary
public static boolean loadAttributeDictionary(AttributeDictionary dict)
public static RadiusAttribute attributeFromString(String src) throws RadiusException, UnknownAttributeException
src
- The source String
RadiusException
UnknownAttributeException
public static void loadAttributesFromString(AttributeList list, String src, String delim, boolean beStrinct) throws RadiusException
RadiusException
public static RadiusAttribute newAttribute(long vendor, long type, byte[] value, int op)
vendor
- The VendorID of the attribute (if one)type
- The Attribute Typevalue
- The Attribute Valueop
- The Attribute Operator
public static RadiusAttribute newAttribute(long vendor, long type, long len, int op, ByteBuffer buffer)
public static RadiusAttribute newAttribute(long type, byte[] value)
type
- The type of the attributevalue
- The value of the attribute
public static AttributeList newAttributeList(long type, byte[] value)
type
- The type of the attributevalue
- The value of the attribute
public static int addToAttributeList(AttributeList list, long type, byte[] value)
list
- The AttributeList to add totype
- The type of the attributevalue
- The value of the attribute
public static byte[] assembleAttributeList(AttributeList list, long type)
public static RadiusAttribute newAttribute(String aName) throws UnknownAttributeException
aName
- The name of the attribute to create
UnknownAttributeException
public static RadiusAttribute newAttribute(AttributeDescription desc) throws UnknownAttributeException
desc
- The RadiusDescription
UnknownAttributeException
public 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 attribute
UnknownAttributeException
public static long getTypeByName(String aName) throws UnknownAttributeException
aName
- The name of the attribute
UnknownAttributeException
public 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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |