Class AnonSubAttribute
java.lang.Object
org.tinyradius.core.attribute.type.AnonSubAttribute
- All Implemented Interfaces:
RadiusAttribute
Represents an unparsable VSA sub-attribute.
As per RFC 2865: The String field is one or more octets. The actual format of the information is site or application specific, and a robust implementation SHOULD support the field as undistinguished octets.
Typically used when Vendor can't be looked up, so we can't determine size of sub-attribute 'type' and 'length' fields.
If Vendor is found, but attribute isn't, we typically use OctetsAttribute instead as we can still read the sub-attribute metadata.
-
Constructor Summary
ConstructorDescriptionAnonSubAttribute
(Dictionary dictionary, int vendorId, io.netty.buffer.ByteBuf data) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.tinyradius.core.attribute.type.RadiusAttribute
decode, encode, flatten, getAttributeName, getAttributeTemplate, getHeaderSize, getLength, getLengthSize, getTagSize, getTypeSize, getVendor, isEncoded, isTagged, toByteArray, toByteBuf
-
Constructor Details
-
AnonSubAttribute
-
-
Method Details
-
getVendorId
public int getVendorId()- Specified by:
getVendorId
in interfaceRadiusAttribute
- Returns:
- vendor Id if Vendor-Specific attribute or sub-attribute, otherwise -1
-
getType
public int getType()- Specified by:
getType
in interfaceRadiusAttribute
- Returns:
- attribute type code, typically 0-255
-
getTag
- Specified by:
getTag
in interfaceRadiusAttribute
- Returns:
- Tag if available and specified for attribute type (RFC2868)
-
getValue
public byte[] getValue()- Specified by:
getValue
in interfaceRadiusAttribute
- Returns:
- attribute data as raw bytes
-
getValueString
- Specified by:
getValueString
in interfaceRadiusAttribute
- Returns:
- value of this attribute as a hex string.
-
getDictionary
- Specified by:
getDictionary
in interfaceRadiusAttribute
- Returns:
- dictionary that attribute uses
-
getData
public io.netty.buffer.ByteBuf getData()Description copied from interface:RadiusAttribute
RadiusAttribute.toByteBuf()
is preferred if caller exposes a reference to the ByteBuf elsewhere to avoid mutating netty ref counts- Specified by:
getData
in interfaceRadiusAttribute
- Returns:
- underlying ByteBuf for attribute, includes attribute header, (optional) tag, and value
-
toString
-