net.sourceforge.jradiusclient
Class RadiusAttribute

java.lang.Object
  |
  +--net.sourceforge.jradiusclient.RadiusAttribute
Direct Known Subclasses:
AcctSessionIdAttribute, AcctStatusTypeAttribute, ChapChallengeAttribute, ChapPasswordAttribute, EapMessageAttribute, ServiceTypeAttribute, UserNameAttribute, UserPasswordAttribute

public class RadiusAttribute
extends java.lang.Object

Released under the LGPL
The most basic representation of an attribute to be used in the request attributes section of the outgoing RadiusPackets. (see known direct known subclasses)

Version:
$Revision: 1.8 $
Author:
Robert J. Loihl

Constructor Summary
RadiusAttribute(int type, byte[] value)
          Construct a basic RadiusAttribute
 
Method Summary
protected  byte[] getBytes()
          get the bytes that will go into a RadiusPacket
 int getType()
          get the Radius Type for this Attribute( see rfc 2865 and 2866)
 byte[] getValue()
          get the data stored for this RadiusAttribute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RadiusAttribute

public RadiusAttribute(int type,
                       byte[] value)
                throws InvalidParameterException
Construct a basic RadiusAttribute

Parameters:
type - - the type of this attribute see RadiusAttributeValues class for possible types
value - - the byte array representation of a specific value for this instance.
Throws:
InvalidParameterException - if the type is not a valid Radius Attribute Type see RFCs 2865 and 2866
Method Detail

getType

public int getType()
get the Radius Type for this Attribute( see rfc 2865 and 2866)

Returns:
the Radius Type for this Attribute

getValue

public byte[] getValue()
get the data stored for this RadiusAttribute

Returns:
the byte[] stored as the value for this RadiusAttribute

getBytes

protected final byte[] getBytes()
get the bytes that will go into a RadiusPacket

Returns:
the byte array to be used in construction of a RadiusPacket