|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.sourceforge.jradiusclient.RadiusPacket
Released under the LGPL
Field Summary | |
static int |
ACCESS_ACCEPT
|
static int |
ACCESS_CHALLENGE
|
static int |
ACCESS_REJECT
|
static int |
ACCESS_REQUEST
|
static int |
ACCOUNTING_MESSAGE
|
static int |
ACCOUNTING_REQUEST
|
static int |
ACCOUNTING_RESPONSE
|
static int |
ACCOUNTING_STATUS
|
static java.lang.String |
EMPTYSTRING
|
static int |
MAX_PACKET_LENGTH
|
static int |
MIN_PACKET_LENGTH
|
static int |
PASSWORD_ACCEPT
|
static int |
PASSWORD_REJECT
|
static int |
PASSWORD_REQUEST
|
static short |
RADIUS_HEADER_LENGTH
RADIUS_HEADER_LENGTH is 20 bytes (corresponding to 1 byte for code + 1 byte for Identifier + 2 bytes for Length + 16 bytes for Request Authenticator) It is not a coincidence that it is the same as the MIN_PACKET_LENGTH |
static int |
RESERVED
|
static int |
STATUS_CLIENT
|
static int |
STATUS_SERVER
|
Constructor Summary | |
RadiusPacket(int type)
builds a type RadiusPacket with no Attributes set |
|
RadiusPacket(int type,
byte identifier)
|
|
RadiusPacket(int type,
byte identifier,
java.util.List attributeList)
Builds a RadiusPacket with a predefined set of attributes |
|
RadiusPacket(int type,
java.util.List attributeList)
Builds a RadiusPacket with a predefined set of attributes |
Method Summary | |
RadiusAttribute |
getAttribute(int attributeType)
retrieve a RadiusAttribute from this RadiusPacket |
protected byte[] |
getAttributeBytes()
get the byte array |
java.util.Collection |
getAttributes()
get all of the RadiusAttributes in this RadiusPacket |
byte |
getPacketIdentifier()
Return the packetIdentifier for this RadiusPacket. |
byte |
getPacketType()
get the packet type for this RadiusPacket |
void |
setAttribute(RadiusAttribute radiusAttribute)
Adds a RadiusAttribute to this RadiusPacket |
void |
setAttributes(java.util.List attributeList)
Add a set of RadiusAttributes to this RadiusPacket |
protected void |
validateAttribute(RadiusAttribute attribute)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int MIN_PACKET_LENGTH
public static final int MAX_PACKET_LENGTH
public static final short RADIUS_HEADER_LENGTH
public static final java.lang.String EMPTYSTRING
public static final int ACCESS_REQUEST
public static final int ACCESS_ACCEPT
public static final int ACCESS_REJECT
public static final int ACCOUNTING_REQUEST
public static final int ACCOUNTING_RESPONSE
public static final int ACCOUNTING_STATUS
public static final int PASSWORD_REQUEST
public static final int PASSWORD_ACCEPT
public static final int PASSWORD_REJECT
public static final int ACCOUNTING_MESSAGE
public static final int ACCESS_CHALLENGE
public static final int STATUS_SERVER
public static final int STATUS_CLIENT
public static final int RESERVED
Constructor Detail |
public RadiusPacket(int type) throws InvalidParameterException
type
- int a PacketType to send.
InvalidParameterException
- if the attributeList is null or contains non-RadiusAttribute type entriespublic RadiusPacket(int type, byte identifier) throws InvalidParameterException
type
- identifier
-
InvalidParameterException
public RadiusPacket(int type, java.util.List attributeList) throws InvalidParameterException
type
- int a PacketType to send.attributeList
- a list of RadiusAttribute objects to initialize this RadiusPacket with
InvalidParameterException
- if the attributeList is null or contains non-RadiusAttribute type entriespublic RadiusPacket(int type, byte identifier, java.util.List attributeList) throws InvalidParameterException
type
- identifier
- attributeList
-
InvalidParameterException
Method Detail |
public void setAttribute(RadiusAttribute radiusAttribute) throws InvalidParameterException
radiusAttribute
- A RadiusAttribute to set on this RadiusPacket
InvalidParameterException
- if the parameter radiusAttribute was nullpublic void setAttributes(java.util.List attributeList) throws InvalidParameterException
attributeList
- a list of RadiusAttribute objects to add to this RadiusPacket
InvalidParameterException
- if the attributeList is null or contains non-RadiusAttribute type entriesprotected void validateAttribute(RadiusAttribute attribute) throws InvalidParameterException
InvalidParameterException
public RadiusAttribute getAttribute(int attributeType) throws InvalidParameterException, RadiusException
attributeType
- an integer between 0 and 256 (i.e. a byte) from the list of Radius constants in
net.sourceforge.jradiusclient.RadiusValues
RadiusException
- if no attribute of type attributeType is stored in this RadiusPacket
InvalidParameterException
- if the attributeType is not between 0 and 256 (i.e. a byte)public java.util.Collection getAttributes()
public byte getPacketType()
public byte getPacketIdentifier()
protected final byte[] getAttributeBytes() throws RadiusException
RadiusException
- If there is any error assembling the bytes into a byte array
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |