public interface AttributeHolder
Modifier and Type | Method and Description |
---|---|
default void |
addAttribute(byte type,
java.lang.String value)
Adds a Radius attribute to this packet.
|
void |
addAttribute(RadiusAttribute attribute) |
default void |
addAttribute(java.lang.String name,
java.lang.String value)
Adds a Radius attribute to this packet.
|
default RadiusAttribute |
getAttribute(byte type)
Convenience method to get single attribute.
|
default RadiusAttribute |
getAttribute(java.lang.String type)
Convenience method to get single attribute.
|
default byte[] |
getAttributeBytes()
Encodes the attributes of this Radius packet to a byte array.
|
default java.util.Map<java.lang.String,java.lang.String> |
getAttributeMap() |
java.util.List<RadiusAttribute> |
getAttributes() |
default java.util.List<RadiusAttribute> |
getAttributes(AttributeType type)
Returns attributes of the given attribute type.
|
default java.util.List<RadiusAttribute> |
getAttributes(byte type)
Returns all attributes of the given type, regardless of vendorId
|
default java.util.List<RadiusAttribute> |
getAttributes(java.lang.String type)
Returns attributes of the given type name.
|
default java.lang.String |
getAttributeString(byte type)
Convenience method to get single attribute as string.
|
int |
getChildVendorId() |
Dictionary |
getDictionary() |
default AttributeType |
lookupAttributeType(java.lang.String name) |
void |
removeAttribute(RadiusAttribute attribute) |
default void |
removeAttributes(byte type)
Removes all attributes from this packet which have got the specified type.
|
default void |
removeLastAttribute(byte type)
Removes the last occurrence of the attribute of the given
type from the packet.
|
int getChildVendorId()
Dictionary getDictionary()
java.util.List<RadiusAttribute> getAttributes()
void addAttribute(RadiusAttribute attribute)
void removeAttribute(RadiusAttribute attribute)
default AttributeType lookupAttributeType(java.lang.String name)
default java.lang.String getAttributeString(byte type)
type
- attribute type namedefault RadiusAttribute getAttribute(java.lang.String type)
type
- attribute type namedefault RadiusAttribute getAttribute(byte type)
type
- attribute typedefault java.util.List<RadiusAttribute> getAttributes(byte type)
type
- type of attributes to getdefault java.util.List<RadiusAttribute> getAttributes(java.lang.String type)
type
- attribute type namedefault java.util.List<RadiusAttribute> getAttributes(AttributeType type)
type
- attribute type namedefault void addAttribute(java.lang.String name, java.lang.String value)
name
- name of the attribute, for example "NAS-IP-Address", should NOT be 'Vendor-Specific'value
- value of the attribute, for example "127.0.0.1"java.lang.IllegalArgumentException
- if type name or value is invaliddefault void addAttribute(byte type, java.lang.String value)
Will add sub-attributes if added from Vendor-Specific Attribute.
type
- attribute type codevalue
- string value to setdefault void removeAttributes(byte type)
type
- attribute type to removedefault void removeLastAttribute(byte type)
type
- attribute type codedefault java.util.Map<java.lang.String,java.lang.String> getAttributeMap()
default byte[] getAttributeBytes()