RADIUS Client API (V3)

com.theorem.radius3
Class AttributeDataType

Object
  extended byAttributeDataType

public final class AttributeDataType
extends Object

Class to guess at the data type in a given attribute. The choices will be INTEGER, OCTETS, STRING, DATE, and IPADDRESS Some attributes will have OR'd values: TUNNEL can be OR'd with any value.


Field Summary
static int DATE
          The attribute is probably time - 8.
static int ENCRYPT1
          The attribute uses encryption type 1 -PAP encoding (can be OR'd with other values) - 64.
static int ENCRYPT2
          The attribute uses encryption type 2 - SALT encoding (can be OR'd with other values) - 128.
static int ENCRYPT3
          The attribute uses encryption type 3 - Ascend encoding (can be OR'd with other values) - 256.
static int INTEGER
          The attribute is probably an integer - 1.
static int IPADDRESS
          The attribute is probably an IP Address (v4 or V6) - 16.
static int OCTETS
          The attribute is probably binary octets - 2.
static int STRING
          The attribute is probably a string - 4.
static int TUNNEL
          The attribute is a tunnel attribute (can be OR'd with other values) - 32.
static int UNKNOWN
          The attribute is unknown - 0.
 
Constructor Summary
AttributeDataType()
           
 
Method Summary
static void addDictionary(RADIUSDictionary dict)
          Add a dictionary to the Attribute Value class.
static int getDataType(int tag)
          Get an attribute data type based on the attribute tag.
static int getDataType(int vendorId, int tag)
          Get an attribute data type based on the attribute tag.
static String getDataTypeName(int dataType)
          Get an attribute data type based on the attribute tag.
static void main(String[] a)
           
static void setDataType(int attributeTag, int dataType)
          Set an attribute to a specific data type.
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN

public static final int UNKNOWN
The attribute is unknown - 0.

See Also:
Constant Field Values

INTEGER

public static final int INTEGER
The attribute is probably an integer - 1.

See Also:
Constant Field Values

OCTETS

public static final int OCTETS
The attribute is probably binary octets - 2.

See Also:
Constant Field Values

STRING

public static final int STRING
The attribute is probably a string - 4.

See Also:
Constant Field Values

DATE

public static final int DATE
The attribute is probably time - 8.

See Also:
Constant Field Values

IPADDRESS

public static final int IPADDRESS
The attribute is probably an IP Address (v4 or V6) - 16.

See Also:
Constant Field Values

TUNNEL

public static final int TUNNEL
The attribute is a tunnel attribute (can be OR'd with other values) - 32.

See Also:
Constant Field Values

ENCRYPT1

public static final int ENCRYPT1
The attribute uses encryption type 1 -PAP encoding (can be OR'd with other values) - 64.

See Also:
Constant Field Values

ENCRYPT2

public static final int ENCRYPT2
The attribute uses encryption type 2 - SALT encoding (can be OR'd with other values) - 128.

See Also:
Constant Field Values

ENCRYPT3

public static final int ENCRYPT3
The attribute uses encryption type 3 - Ascend encoding (can be OR'd with other values) - 256.

See Also:
Constant Field Values
Constructor Detail

AttributeDataType

public AttributeDataType()
Method Detail

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.

getDataType

public static int getDataType(int tag)
Get an attribute data type based on the attribute tag.

Parameters:
tag - Attribute type, E.g. Attribute.User_Name
Returns:
probable data type.

getDataType

public static int getDataType(int vendorId,
                              int tag)
Get an attribute data type based on the attribute tag.

Parameters:
tag - Attribute type, E.g. Attribute.User_Name
Returns:
probable data type.

getDataTypeName

public static String getDataTypeName(int dataType)
Get an attribute data type based on the attribute tag.

Parameters:
dataType - Attribute data type, e.g. the value INTEGER.
Returns:
data type.
Since:
Server 3.43a

setDataType

public static void setDataType(int attributeTag,
                               int dataType)
Set an attribute to a specific data type. This is used to alter the table contents.

Parameters:
attributeTag - Attribute type, E.g. Attribute.User_Name.
dataType - Set to one of the data types, E.g. STRING.

main

public static void main(String[] a)

RADIUS Client API (V3)

Submit a bug report or feature request

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