net.jradius.dictionary.Attr_EAPCode Maven / Gradle / Ivy
// DO NOT EDIT THIS FILE DIRECTLY! - AUTOMATICALLY GENERATED
// Generated by: class net.jradius.freeradius.RadiusDictionary
// Generated on: Fri, 29 Nov 2013 13:24:47 +0000
package net.jradius.dictionary;
import java.io.Serializable;
import java.util.LinkedHashMap;
import java.util.Map;
import net.jradius.packet.attribute.RadiusAttribute;
import net.jradius.packet.attribute.value.NamedValue;
/**
* Attribute Name: EAP-Code
* Attribute Type: 1021 (FreeRADIUS Internal Attribute)
* Value Type: NamedValue
* Possible Values:
*
* - Request (1)
*
- Response (2)
*
- Success (3)
*
- Failure (4)
*
*
* @author class net.jradius.freeradius.RadiusDictionary
*/
public final class Attr_EAPCode extends RadiusAttribute
{
public static final String NAME = "EAP-Code";
public static final long TYPE = 1021;
public static final long serialVersionUID = TYPE;
public static final Long Request = new Long(1L);
public static final Long Response = new Long(2L);
public static final Long Success = new Long(3L);
public static final Long Failure = new Long(4L);
protected class NamedValueMap implements NamedValue.NamedValueMap
{
public Long[] knownValues = { new Long(1L),new Long(2L),new Long(3L),new Long(4L)};
public Long[] getKnownValues() { return knownValues; }
public Long getNamedValue(String name)
{
if ("Request".equals(name)) return new Long(1L);
if ("Response".equals(name)) return new Long(2L);
if ("Success".equals(name)) return new Long(3L);
if ("Failure".equals(name)) return new Long(4L);
return null;
}
public String getNamedValue(Long value)
{
if (new Long(1L).equals(value)) return "Request";
if (new Long(2L).equals(value)) return "Response";
if (new Long(3L).equals(value)) return "Success";
if (new Long(4L).equals(value)) return "Failure";
return null;
}
};
public static NamedValueMap map = null;
public void setup()
{
attributeName = NAME;
attributeType = 1021;
attributeValue = new NamedValue(map != null ? map : (map = new NamedValueMap()));
}
public Attr_EAPCode()
{
setup();
}
public Attr_EAPCode(Serializable o)
{
setup(o);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy