AXL Software™

com.theorem.tacacs
Class AVPair

Object
  extended byAVPair

public class AVPair
extends Object

A TACACS+ Attribute Value Pair.

An AV Pair is an Attribute name and it's value separated by separator character. The separator is either a '=' or '*'. '=' means that the value is mandatory while '*' means the attribute is optional. An example: service=ppp


Constructor Summary
AVPair(String attribute)
          Constructor.
AVPair(String name, String separator, String value)
          Constructor.
 
Method Summary
 boolean equals(Object o)
          Two AVPair's are equal if the attribute name matches.
 String getAVPair()
          Get the full AV Pair.
 String getName()
          Get the attribute name.
 String getSeparator()
          Get the attribute separator.
 String getValue()
          Get the attribute value.
static void main(String[] arg)
           
 void setName(String name)
          Set the attribute name.
 void setSeparator(String separatorChar)
          Set the attribute separator.
 void setValue(String value)
          Set the attribute value.
 String toString()
          String representation of the AVPair.
 
Methods inherited from class Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AVPair

public AVPair(String attribute)
       throws TACACSException
Constructor.

Spaces are not permitted except in the value.
For example "server_msg=This is the end." is correct.
"server_msg = This is the end." is wrong.

Parameters:
attribute - The AV Pair string.
Throws:
TACACSException - if the attribute cannot be parsed correctly.

AVPair

public AVPair(String name,
              String separator,
              String value)
Constructor.

Parameters:
name - Attribute name.
separator - Separator character, '=' for mandatory, '*' for optional.
value - Attribute value.
Method Detail

getName

public String getName()
Get the attribute name.

Returns:
name.

setName

public void setName(String name)
Set the attribute name.

Parameters:
name - Attribute pair name..

getSeparator

public String getSeparator()
Get the attribute separator. The separator character may be '=' for mandatory, '*' for optional.

Returns:
separator.

setSeparator

public void setSeparator(String separatorChar)
Set the attribute separator. The separator character may be '=' for mandatory, '*' for optional.

Parameters:
separatorChar - Separator. This is not checked for correctness.

getValue

public String getValue()
Get the attribute value.

Returns:
value.

setValue

public void setValue(String value)
Set the attribute value.

Parameters:
value - AVPair value.

getAVPair

public String getAVPair()
Get the full AV Pair. This is a concatenation of the name, separator and value as in 'protocol=ip' from name = "protocol", separator = "=", and the value of "ip".

Returns:
AV Pair.

equals

public boolean equals(Object o)
Two AVPair's are equal if the attribute name matches.


toString

public String toString()
String representation of the AVPair. This is a concatenation of the name, separator and value as in 'protocol=ip' from name = "protocol", separator = "=", and the value of "ip".

Returns:
String.

main

public static void main(String[] arg)

AXL Software™

Submit a bug report or feature request

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