net.jradius.dictionary.Attr_FramedRouting Maven / Gradle / Ivy
The newest version!
// DO NOT EDIT THIS FILE DIRECTLY! - AUTOMATICALLY GENERATED
// Generated by: class net.jradius.freeradius.RadiusDictionary
// Generated on: Thu, 5 Jan 2017 16:12:37 +0200
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: Framed-Routing
* Attribute Type: 10
* Value Type: NamedValue
* Possible Values:
*
* - None (0)
*
- Broadcast (1)
*
- Listen (2)
*
- Broadcast-Listen (3)
*
*
* @author class net.jradius.freeradius.RadiusDictionary
*/
public final class Attr_FramedRouting extends RadiusAttribute
{
public static final String NAME = "Framed-Routing";
public static final long TYPE = 10;
public static final long serialVersionUID = TYPE;
public static final Long None = new Long(0L);
public static final Long Broadcast = new Long(1L);
public static final Long Listen = new Long(2L);
public static final Long BroadcastListen = new Long(3L);
@SuppressWarnings("serial")
protected class NamedValueMap implements NamedValue.NamedValueMap, Serializable
{
public Long[] knownValues = { new Long(0L),new Long(1L),new Long(2L),new Long(3L)};
public Long[] getKnownValues() { return knownValues; }
public Long getNamedValue(String name)
{
if ("None".equals(name)) return new Long(0L);
if ("Broadcast".equals(name)) return new Long(1L);
if ("Listen".equals(name)) return new Long(2L);
if ("Broadcast-Listen".equals(name)) return new Long(3L);
return null;
}
public String getNamedValue(Long value)
{
if (new Long(0L).equals(value)) return "None";
if (new Long(1L).equals(value)) return "Broadcast";
if (new Long(2L).equals(value)) return "Listen";
if (new Long(3L).equals(value)) return "Broadcast-Listen";
return null;
}
};
public static transient NamedValueMap map = null;
public void setup()
{
attributeName = NAME;
attributeType = 10;
attributeValue = new NamedValue(map != null ? map : (map = new NamedValueMap()));
}
public Attr_FramedRouting()
{
setup();
}
public Attr_FramedRouting(Serializable o)
{
setup(o);
}
}