Class AccountingRequest
java.lang.Object
org.tinyradius.core.packet.BaseRadiusPacket<RadiusRequest>
org.tinyradius.core.packet.request.GenericRequest
org.tinyradius.core.packet.request.AccountingRequest
- All Implemented Interfaces:
AttributeHolder<RadiusRequest>
,NestedAttributeHolder<RadiusRequest>
,RadiusPacket<RadiusRequest>
,RadiusRequest
public class AccountingRequest extends GenericRequest
This class represents a Radius packet of the type Accounting-Request.
-
Field Summary
Fields inherited from interface org.tinyradius.core.packet.RadiusPacket
HEADER_LENGTH, MAX_PACKET_LENGTH, packetLogger
-
Constructor Summary
Constructors Constructor Description AccountingRequest(Dictionary dictionary, byte identifier, byte[] authenticator, java.util.List<RadiusAttribute> attributes)
Constructs an Accounting-Request packet to be sent to a Radius server. -
Method Summary
Modifier and Type Method Description AccountingRequest
encodeRequest(java.lang.String sharedSecret)
Encode request and generate authenticator.AccountingRequest
withAttributes(java.util.List<RadiusAttribute> attributes)
Methods inherited from class org.tinyradius.core.packet.request.GenericRequest
decodeRequest, genAuth
Methods inherited from class org.tinyradius.core.packet.BaseRadiusPacket
decodeAttributes, encodeAttributes, equals, getAttributes, getAuthenticator, getChildVendorId, getDictionary, getId, getType, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.tinyradius.core.attribute.AttributeHolder
addAttribute, addAttribute, filterAttributes, filterAttributes, filterAttributes, getAttribute, getAttribute, getAttributeBytes, getChildVendorId, removeAttributes, removeLastAttribute
Methods inherited from interface org.tinyradius.core.attribute.NestedAttributeHolder
addAttribute, filterAttributes, filterAttributes, getAttribute, getFlattenedAttributes, getVendorAttributes, removeAttribute, removeAttributes
Methods inherited from interface org.tinyradius.core.packet.RadiusPacket
genHashedAuth, getAttributes, getAuthenticator, getDictionary, getId, getType, toDatagram, toDatagram, verifyPacketAuth
-
Constructor Details
-
AccountingRequest
public AccountingRequest(Dictionary dictionary, byte identifier, byte[] authenticator, java.util.List<RadiusAttribute> attributes)Constructs an Accounting-Request packet to be sent to a Radius server.- Parameters:
dictionary
- custom dictionary to useidentifier
- packet identifierauthenticator
- authenticator for packet, nullableattributes
- list of attributes
-
-
Method Details
-
encodeRequest
Description copied from interface:RadiusRequest
Encode request and generate authenticator.Must be idempotent.
- Specified by:
encodeRequest
in interfaceRadiusRequest
- Overrides:
encodeRequest
in classGenericRequest
- Parameters:
sharedSecret
- shared secret that secures the communication with the other Radius server/client- Returns:
- RadiusRequest with new authenticator and/or encoded attributes
-
withAttributes
- Specified by:
withAttributes
in interfaceAttributeHolder<RadiusRequest>
- Overrides:
withAttributes
in classGenericRequest
-