|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.jradius.packet.attribute.AttributeList
public class AttributeList
Represents the Attribute List of a packet. Supports singleton and lists of attribute values (building packets with several of the same attribute).
Constructor Summary | |
---|---|
AttributeList()
Default constructor |
Method Summary | |
---|---|
void |
_add(RadiusAttribute a,
boolean overwrite)
|
void |
add(AttributeList list)
Add an attribute list to this attribute list |
void |
add(RadiusAttribute a)
Add an attribute, defaulting to overwriting |
void |
add(RadiusAttribute a,
boolean overwrite)
Add an attribute with option to overwrite. |
void |
clear()
|
RadiusAttribute |
get(long type)
|
Object |
get(long type,
boolean single)
|
RadiusAttribute |
get(String name)
|
Object |
get(String name,
boolean single)
|
Object[] |
getArray(long type)
Get all attributes of a certain type returned at an array |
List<RadiusAttribute> |
getAttributeList()
Returns the attribute hash as a list |
Map<Long,Object> |
getMap()
|
int |
getSize()
|
Object |
getValue(long type)
|
void |
remove(long attributeType)
Removes attribute(s) by type |
void |
remove(RadiusAttribute a)
Removes attribute(s) by type |
void |
removeUnknown()
Removes all unknown (not in the configured JRadius Dictionary) attribtues. |
String |
toString()
|
String |
toString(boolean nonStandardAttrs,
boolean unknownAttrs)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AttributeList()
Method Detail |
---|
public void add(AttributeList list)
list
- The attribute list to addpublic void add(RadiusAttribute a)
a
- The attribute to addpublic void _add(RadiusAttribute a, boolean overwrite)
public void add(RadiusAttribute a, boolean overwrite)
a
- overwrite
- public void remove(RadiusAttribute a)
a
- RadiusAttribute to removepublic void remove(long attributeType)
attributeType
- The attribute type to removepublic void clear()
public int getSize()
public void removeUnknown()
public Object get(long type, boolean single)
type
- The type of attribute to retrievesingle
- True if a only a single attribute can be returned;
false if a List of attributes is also ok
public RadiusAttribute get(long type)
public Object get(String name, boolean single) throws UnknownAttributeException
UnknownAttributeException
public RadiusAttribute get(String name) throws UnknownAttributeException
UnknownAttributeException
public Object getValue(long type)
public Object[] getArray(long type)
type
- The type of attribute to find
public String toString(boolean nonStandardAttrs, boolean unknownAttrs)
public String toString()
toString
in class Object
public List<RadiusAttribute> getAttributeList()
public Map<Long,Object> getMap()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |