Package org.tinyradius.packet
Class AccountingRequest
- java.lang.Object
-
- org.tinyradius.packet.RadiusPacket
-
- org.tinyradius.packet.AccountingRequest
-
public class AccountingRequest extends RadiusPacket
This class represents a Radius packet of the type Accounting-Request.
-
-
Field Summary
Fields Modifier and Type Field Description static int
ACCT_STATUS_TYPE_ACCOUNTING_OFF
static int
ACCT_STATUS_TYPE_ACCOUNTING_ON
static int
ACCT_STATUS_TYPE_INTERIM_UPDATE
static int
ACCT_STATUS_TYPE_START
static int
ACCT_STATUS_TYPE_STOP
-
Fields inherited from class org.tinyradius.packet.RadiusPacket
HEADER_LENGTH
-
-
Constructor Summary
Constructors Constructor Description AccountingRequest(Dictionary dictionary, int identifier, byte[] authenticator)
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.AccountingRequest(Dictionary dictionary, int identifier, byte[] authenticator, java.util.List<RadiusAttribute> attributes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getAcctStatusType()
java.lang.String
getUserName()
Retrieves the user name from the User-Name attribute.void
setAcctStatusType(int acctStatusType)
Sets the Acct-Status-Type attribute of this Accounting-Request.void
setUserName(java.lang.String userName)
Sets the User-Name attribute of this Accounting-Request.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from class org.tinyradius.packet.RadiusPacket
addAttribute, addAttribute, createHashedAuthenticator, encodeRequest, encodeResponse, getAttribute, getAttribute, getAttribute, getAttributeBytes, getAttributeMap, getAttributes, getAttributes, getAttributes, getAttributeValue, getAuthenticator, getDictionary, getIdentifier, getType, getVendorAttributes, removeAttribute, removeAttributes, removeAttributes, removeLastAttribute, toString, verify
-
-
-
-
Field Detail
-
ACCT_STATUS_TYPE_START
public static final int ACCT_STATUS_TYPE_START
- See Also:
- Constant Field Values
-
ACCT_STATUS_TYPE_STOP
public static final int ACCT_STATUS_TYPE_STOP
- See Also:
- Constant Field Values
-
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 useidentifier
- packet identifierauthenticator
- authenticator for packet, nullableuserName
- user nameacctStatusType
- 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
-
-