Core API 7.8

net.juniper.smgt.sae.radiuslib
Interface RadiusPacketDelegate


public interface RadiusPacketDelegate

This interface provides methods to include an identifier for a RADIUS attribute and a value for that attribute in a RADIUS packet. The interface also provides methods to retrieve an attribute value from a RADIUS packet.


Method Summary
 void append(java.lang.String attrId, long value)
          Includes a specified RADIUS attribute and its value in a RADIUS packet.
 void append(java.lang.String attrId, java.lang.String value)
          Includes a specified RADIUS attribute and its value in a RADIUS packet.
 java.lang.Object[] getAttributeValues(java.lang.String attrId)
          Retrieves the attribute values from a RADIUS packet that has a specified identifier for an attribute.
 

Method Detail

append

void append(java.lang.String attrId,
            long value)
            throws RadiusPacketFailedAccessException
Includes a specified RADIUS attribute and its value in a RADIUS packet.

Parameters:
attrId - Identifier for the attribute.
value - Value of the attribute. If value is -1L, the method ignores the attribute and does not raise an exception.
Throws:
RadiusPacketFailedAccessException - Raised if attrId does not correspond to a valid RADIUS attribute or if the attribute is not of numeric type.

append

void append(java.lang.String attrId,
            java.lang.String value)
            throws RadiusPacketFailedAccessException
Includes a specified RADIUS attribute and its value in a RADIUS packet.

Parameters:
attrId - Identifier for the attribute.
value - Value of the attribute. if value is null or an empty string, the method ignores the attribute and does not raise an exception.
Throws:
RadiusPacketFailedAccessException - Raised if attrId does not correspond to a valid RADIUS attribute, or if the attribute is not of type string or text, or if the attribute is of text type but value cannot be encoded in the UFT-8 format.

getAttributeValues

java.lang.Object[] getAttributeValues(java.lang.String attrId)
                                      throws RadiusPacketFailedAccessException
Retrieves the attribute values from a RADIUS packet that has a specified identifier for an attribute.

Parameters:
attrId - Identifier for the attribute.
Returns:
Array of the attribute values.

It returns an array of Long if the attribute is of type integer,address, or time.

It returns an array of String if the attribute is of type string or text.

It returns an empty array if the attribute is not found in the RADIUS packet.

Throws:
RadiusPacketFailedAccessException - Raised if attrId does not correspond to a valid RADIUS attribute or if type is different than the type for the attribute.

Core API 7.8