AXL Software®

com.theorem.radius3
Class AV

Object
  extended byAV

public final class AV
extends Object

Class holding attribute integer value field enumerations.

For example the field values for the Termination-Action attribute are Echo (0) and RADIUS-Request (1).

This class also associates string names to the values for some attribute enumerations using the static lookup() method.

 AttributeList list = new AttributeList();
 list.addAttribute(Attribute.Acct_Status_Type, AV.Acct_Status_Type.Start);

 int value = list.getInt(Attribute.Acct_Status_Type);
 System.out.println("Attribute value is " +
        AV.lookup(Attribute.Acct_Status_Type, value));
This will print: Attribute value is Start


Nested Class Summary
static class AV.Acct_Authentic
          Acct-Authentic values.
static class AV.Acct_Status_Type
          Acct-Status-Type values.
static class AV.Acct_Terminate_Cause
          Acct-Terminate-Cause values.
static class AV.ARAP_Zone_Access
          ARAP-Zone-Access values.
static class AV.Error_Cause
          Error-Cause values.
static class AV.Framed_Compression
          Framed-Compression values.
static class AV.Framed_Protocol
          Framed-Protocol values.
static class AV.Framed_Routing
          Framed-Routing values.
static class AV.Login_Service
          Login-Service values.
static class AV.NAS_Port_Type
          NAS-Port-Type values.
static class AV.Service_Type
          Service-Type values.
static class AV.Termination_Action
          Termination-Action values.
static class AV.Tunnel_Medium_Type
          Tunnel-Medium values.
static class AV.Tunnel_Type
          Tunnel-Type values.
 
Constructor Summary
AV()
          Default constructor;
 
Method Summary
static void addDictionary(RADIUSDictionary dict)
          Add a dictionary to the Attribute Value class.
static int[] getAllValues(int tag)
          Get all values for an attribute.
static int[] getAllValues(int vendorId, int tag)
          Get all values for an attribute.
static String lookup(int attribute, int value)
          Look up the name for an Attribute / Int Value pair.
static String lookup(int vendorId, int attribute, int value)
          Look up the name for an Attribute / Int Value pair.
static int lookup(int attribute, String value)
          Look up the integer value for an Attribute / name pair.
static int lookup(String tagName)
          Look up an attribute tag from a name.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AV

public AV()
Default constructor;

Method Detail

lookup

public static String lookup(int attribute,
                            int value)
Look up the name for an Attribute / Int Value pair. Not all integer values have an enumeration of values. For example
 // This returns "PPP".
 String x = AV.lookup(Attribute.Framed_Protocol, 1);
 

Parameters:
attribute - The attribute tag value.
value - The integer data value.
Returns:
The value's name or the empty string if no match was found.

lookup

public static String lookup(int vendorId,
                            int attribute,
                            int value)
Look up the name for an Attribute / Int Value pair. Not all integer values have an enumeration of values. For example
 // This returns "PPP".
 String x = AV.lookup(Attribute.Framed_Protocol, 1);
 

Parameters:
vendorId - Vendor Id.
attribute - The attribute tag value.
value - The integer data value.
Returns:
The value's name or the empty string if no match was found.
Since:
Server 3.43a.

addDictionary

public static void addDictionary(RADIUSDictionary dict)
Add a dictionary to the Attribute Value class. Adding a dictionary to AV also adds it to the AttributeName class.

Parameters:
dict - Dictionary.
Since:
Server 3.43.

lookup

public static int lookup(String tagName)
Look up an attribute tag from a name.

Parameters:
tagName - Attribute tag name like "NAS-IP-Address".
Returns:
the tag number or -1 if the tag could not be found.

lookup

public static int lookup(int attribute,
                         String value)
Look up the integer value for an Attribute / name pair. Not all values have a name. For example
 // This returns 1.
 int x = AV.lookup(Attribute.Framed_Protocol, "PPP");
 

Parameters:
attribute - The attribute tag value.
value - The string (human readable) value of the attribute integer value.
Returns:
The value's integer value or -1 if no match was found.

getAllValues

public static int[] getAllValues(int tag)
Get all values for an attribute. Not every attribute has a list of values.

Parameters:
tag - Attribute tag.
Returns:
Array of values. If there are no values an empty array is returned.

getAllValues

public static int[] getAllValues(int vendorId,
                                 int tag)
Get all values for an attribute. Not every attribute has a list of values.

Parameters:
vendorId - Vendor Id.
tag - Attribute tag.
Returns:
Array of values. If there are no values an empty array is returned.
Since:
3.43

AXL Software®

Submit a bug report or feature request

Copyright 1998-2009 AXL Software® PO Box 97, Viola, Delaware 19979, U.S.A. All Rights Reserved.