Class AccountingRequest



  • public class AccountingRequest
    extends RadiusPacket
    This class represents a Radius packet of the type Accounting-Request.
    • Field Detail

      • ACCT_STATUS_TYPE_INTERIM_UPDATE

        public static final int ACCT_STATUS_TYPE_INTERIM_UPDATE
        See Also:
        Constant Field Values
      • ACCT_STATUS_TYPE_ACCOUNTING_ON

        public static final int ACCT_STATUS_TYPE_ACCOUNTING_ON
        See Also:
        Constant Field Values
      • ACCT_STATUS_TYPE_ACCOUNTING_OFF

        public static final int ACCT_STATUS_TYPE_ACCOUNTING_OFF
        See Also:
        Constant Field Values
    • Constructor Detail

      • AccountingRequest

        public AccountingRequest​(Dictionary dictionary,
                                 int identifier,
                                 byte[] authenticator,
                                 java.lang.String userName,
                                 int acctStatusType)
        Constructs an Accounting-Request packet to be sent to a Radius server.
        Parameters:
        dictionary - custom dictionary to use
        identifier - packet identifier
        authenticator - authenticator for packet, nullable
        userName - user name
        acctStatusType - ACCT_STATUS_TYPE_*
      • AccountingRequest

        public AccountingRequest​(Dictionary dictionary,
                                 int identifier,
                                 byte[] authenticator)
      • AccountingRequest

        public AccountingRequest​(Dictionary dictionary,
                                 int identifier,
                                 byte[] authenticator,
                                 java.util.List<RadiusAttribute> attributes)
    • Method Detail

      • setUserName

        public void setUserName​(java.lang.String userName)
        Sets the User-Name attribute of this Accounting-Request.
        Parameters:
        userName - user name to set
      • getUserName

        public java.lang.String getUserName​()
        Retrieves the user name from the User-Name attribute.
        Returns:
        user name
      • setAcctStatusType

        public void setAcctStatusType​(int acctStatusType)
        Sets the Acct-Status-Type attribute of this Accounting-Request.
        Parameters:
        acctStatusType - ACCT_STATUS_TYPE_* to set
      • getAcctStatusType

        public int getAcctStatusType​()
        Returns:
        Acct-Status-Type value