|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.jradius.packet.RadiusPacket
public abstract class RadiusPacket
Represents a Radius Packet. All radius packet classes are derived from this abstract class.
Field Summary | |
---|---|
protected AttributeList |
attributes
|
protected byte[] |
authenticator
|
protected int |
code
|
protected int |
identifier
|
static int |
MAX_PACKET_LENGTH
|
static int |
MIN_PACKET_LENGTH
|
static short |
RADIUS_HEADER_LENGTH
|
Constructor Summary | |
---|---|
RadiusPacket()
Default Constructor |
|
RadiusPacket(AttributeList list)
Constructs a RadiusPacket with an AttributeList |
Method Summary | |
---|---|
void |
addAttribute(RadiusAttribute attribute)
Adds an attribute to a RadiusPacket (without overriding any existing attributes) |
void |
addAttributes(AttributeList list)
Adds the contents of an AttributeList to a RadiusPacket |
byte[] |
createAuthenticator(byte[] attributes)
Derived RadiusRequest classes must override this |
RadiusAttribute |
findAttribute(int type)
|
RadiusAttribute |
findAttribute(java.lang.String aName)
|
java.lang.Object[] |
findAttributes(int type)
|
AttributeList |
getAttributes()
Get the attributes of a RadiusPacket |
java.lang.Object |
getAttributeValue(int type)
|
java.lang.Object |
getAttributeValue(java.lang.String aName)
|
byte[] |
getAuthenticator()
|
byte[] |
getAuthenticator(byte[] attributes)
Get (or generate) the RADIUS Authenticator |
int |
getCode()
|
int |
getIdentifier()
Get the Identifier of the RadiusPacket (creating one if needed) |
void |
overwriteAttribute(RadiusAttribute attribute)
Adds an attribute to a RadiusPacket overwriting any existing attribute |
void |
removeAttribute(int attributeType)
Removes an attribute |
void |
removeAttribute(RadiusAttribute attribute)
Removes an attribute |
void |
setAuthenticator(byte[] authenticator)
|
void |
setCode(int code)
|
void |
setIdentifier(int i)
Set the Identifier byte of a RadiusPacket |
java.lang.String |
toString()
|
java.lang.String |
toString(boolean nonStandardAtts,
boolean unknownAttrs)
Formats the RadiusPacket into a String |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, 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
protected int code
protected int identifier
protected byte[] authenticator
protected final AttributeList attributes
Constructor Detail |
---|
public RadiusPacket()
public RadiusPacket(AttributeList list)
list
- Initial AttributeListMethod Detail |
---|
public void setCode(int code)
code
- The code to setpublic int getCode()
public void addAttribute(RadiusAttribute attribute)
attribute
- The attribute to addpublic void overwriteAttribute(RadiusAttribute attribute)
attribute
- The attribute to addpublic void addAttributes(AttributeList list)
list
- The attributes to addpublic void removeAttribute(RadiusAttribute attribute)
attribute
- The RadiusAttribute to be removedpublic void removeAttribute(int attributeType)
attributeType
- The attribute type to be removedpublic int getIdentifier()
public void setIdentifier(int i)
i
- The new Identifierpublic AttributeList getAttributes()
public byte[] createAuthenticator(byte[] attributes)
attributes
-
public void setAuthenticator(byte[] authenticator)
authenticator
- The authenticator to set.public byte[] getAuthenticator()
public byte[] getAuthenticator(byte[] attributes)
attributes
-
public RadiusAttribute findAttribute(int type)
type
- The attribute type
public java.lang.Object[] findAttributes(int type)
type
- The integer type of the attribute to find
public RadiusAttribute findAttribute(java.lang.String aName) throws UnknownAttributeException
aName
- The name of the attribute to find
UnknownAttributeException
public java.lang.Object getAttributeValue(int type)
type
- The integer type of the attribute to find
public java.lang.Object getAttributeValue(java.lang.String aName) throws UnknownAttributeException
aName
- The name of the attribute to find
UnknownAttributeException
public java.lang.String toString(boolean nonStandardAtts, boolean unknownAttrs)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |