public class RadiusPacket extends RadiusAttributeSet
RadiusAttributeSet.RadiusAttributeSet}, {@link RadiusDictionary}| Modifier and Type | Class and Description |
|---|---|
static class |
RadiusPacket.RadiusPacketOption<T>
Класс, объекты которого используются для установки
setOption(RadiusPacketOption, Object)
и для получения getOption(RadiusPacketOption). |
| Modifier and Type | Field and Description |
|---|---|
static byte |
ACCESS_ACCEPT |
static byte |
ACCESS_CHALLENGE |
static byte |
ACCESS_REJECT |
static byte |
ACCESS_REQUEST |
static byte |
ACCOUNTING_MESSAGE |
static byte |
ACCOUNTING_REQUEST |
static byte |
ACCOUNTING_RESPONSE |
static byte |
ACCOUNTING_STATUS |
static byte |
ACCOUNTING_STATUS_START |
static byte |
ACCOUNTING_STATUS_STOP |
static byte |
ACCOUNTING_STATUS_UPDATE |
protected byte[] |
authenticator
Для пришедшего запроса это authenticator который хранится в запросе,
для создаваемого запроса - null. |
static byte |
CoA_ACK |
static byte |
CoA_NAK |
static byte |
CoA_REQUEST |
static byte |
DISCONNECT_ACK |
static byte |
DISCONNECT_NAK |
static byte |
DISCONNECT_REQUEST |
byte |
identifier
Идентификатор пакета.
|
protected byte[] |
messageAuthenticator
Атрибут для подписи пакета
RadiusDictionary.Message_Authenticator. |
static byte |
PASSWORD_ACCEPT |
static byte |
PASSWORD_REJECT |
static byte |
PASSWORD_REQUEST |
protected byte[] |
requestAuthenticator
Для создаваемого ответа - это authenticator запроса.
|
static byte |
STATUS_CLIENT |
static byte |
STATUS_SERVER |
standartAttributes, vendorAttributes| Modifier | Constructor and Description |
|---|---|
|
RadiusPacket(byte code,
byte identifier)
Создание радиус пакета (запрос).
|
protected |
RadiusPacket(byte code,
byte identifier,
byte[] requestAuthenticator,
byte[] authenticator,
byte[] messageAuthenticator,
java.util.Map<java.lang.Integer,java.util.List<RadiusAttribute<?>>> standartAttributes,
java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.List<RadiusAttribute<?>>>> vendorAttributes,
java.util.Map<java.lang.String,java.lang.Object> optionMap) |
| Modifier and Type | Method and Description |
|---|---|
void |
addAttribute(bitel.billing.server.radius.RadiusAttribute ra)
Deprecated.
|
void |
addAttributes(java.util.List<bitel.billing.server.radius.RadiusAttribute> attrs)
Deprecated.
|
void |
addOptions(RadiusPacket request) |
void |
addVendorAttribute(bitel.billing.server.radius.RadiusVendorAttribute rva)
Deprecated.
|
void |
addVendorAttributes(java.util.List<bitel.billing.server.radius.RadiusVendorAttribute> attrs)
Deprecated.
|
RadiusPacket |
clone() |
RadiusPacket |
createResponse()
Создание пакета-ответа из пакета-запроса.
|
void |
fromPacket(RadiusPacket lastResponsePacket) |
byte[] |
getAuthenticator() |
byte[] |
getAuthenticatorBytes()
Deprecated.
|
byte[] |
getByteAttribute(int code)
Deprecated.
|
byte |
getCode()
Получение типа пакета (например,
ACCESS_REQUEST ACCOUNTING_REQUEST). |
int |
getFlag()
Deprecated.
|
int |
getIntAttribute(int code)
Deprecated.
use
#getIntAttribute(int, int, int) |
<O> O |
getOption(RadiusPacket.RadiusPacketOption<O> option)
Получение опции(атрибута) из пакета.
|
<O> O |
getOption(RadiusPacket.RadiusPacketOption<O> option,
O value)
Получение опции(атрибута) из пакета.
|
java.lang.Object |
getOption(java.lang.String option)
Deprecated.
|
byte |
getPacketId()
Deprecated.
|
int |
getPacketType()
Deprecated.
use
getCode() |
java.lang.String |
getPacketTypeString()
Получение названия типа radius-пакета
|
java.lang.String |
getStringAttribute(int code)
Deprecated.
|
Trace |
getTrace() |
java.util.List<RadiusAttribute<?>> |
getVendorAttributes(int vendor)
Deprecated.
|
java.util.List<RadiusAttribute<?>> |
getVendorAttributes(int vendor,
int code)
Deprecated.
|
int |
getVendorIntAttribute(int code)
Deprecated.
use
#getIntAttribute(int, int, int) |
java.lang.String |
getVendorStringAttribute(int code)
Deprecated.
|
boolean |
isRequest() |
static RadiusPacket |
parse(java.nio.ByteBuffer bb)
Парсинг пакета из ByteBuffer.
|
static RadiusPacket |
parse(java.nio.ByteBuffer bb,
boolean move)
Парсинг пакета из ByteBuffer.
|
void |
setByteAttribute(int code,
byte[] value)
Deprecated.
|
void |
setCode(byte code)
Установка типа пакета.
|
void |
setFlag(int flag)
Deprecated.
|
void |
setIntAttribute(int code,
int value)
Deprecated.
|
<O> void |
setOption(RadiusPacket.RadiusPacketOption<O> option,
O value)
Установка опции в пакет.
|
void |
setOption(java.lang.String option,
java.lang.Object value)
Deprecated.
|
void |
setPacketType(byte value)
Deprecated.
use
setCode(byte) |
void |
setStringAttribute(int code,
java.lang.String value)
Deprecated.
|
void |
setVendorAttribute(bitel.billing.server.radius.RadiusVendorAttribute rva)
Deprecated.
|
java.lang.String |
toString() |
void |
write(java.nio.ByteBuffer bb,
byte[] key)
Сериализация пакета в ByteBuffer.
|
addAttribute, addAttributes, contains, equals, getAttribute, getAttributes, getAttributeValue, getAttributeValue, getByteAttribute, getIntAttribute, getRadiusAttributeSet, getRadiusAttributeSet, getStringAttribute, getStringAttribute, isEmpty, newRadiusAttributeRealmMap, newRadiusAttributeSet, newRadiusAttributeSet, newRadiusAttributeSetMap, newRadiusAttributeSetRealmMap, removeAttributes, setAttribute, setAttributes, setAttributes, setByteAttribute, setIntAttribute, setStringAttribute, toStringpublic static final byte ACCESS_REQUEST
public static final byte ACCESS_ACCEPT
public static final byte ACCESS_REJECT
public static final byte ACCOUNTING_REQUEST
public static final byte ACCOUNTING_RESPONSE
public static final byte ACCOUNTING_STATUS
public static final byte PASSWORD_REQUEST
public static final byte PASSWORD_ACCEPT
public static final byte PASSWORD_REJECT
public static final byte ACCOUNTING_MESSAGE
public static final byte ACCESS_CHALLENGE
public static final byte STATUS_SERVER
public static final byte STATUS_CLIENT
public static final byte DISCONNECT_REQUEST
public static final byte DISCONNECT_ACK
public static final byte DISCONNECT_NAK
public static final byte CoA_REQUEST
public static final byte CoA_ACK
public static final byte CoA_NAK
public static final byte ACCOUNTING_STATUS_START
public static final byte ACCOUNTING_STATUS_STOP
public static final byte ACCOUNTING_STATUS_UPDATE
public final byte identifier
protected final byte[] requestAuthenticator
protected byte[] authenticator
protected final byte[] messageAuthenticator
RadiusDictionary.Message_Authenticator.protected RadiusPacket(byte code,
byte identifier,
byte[] requestAuthenticator,
byte[] authenticator,
byte[] messageAuthenticator,
java.util.Map<java.lang.Integer,java.util.List<RadiusAttribute<?>>> standartAttributes,
java.util.Map<java.lang.Integer,java.util.Map<java.lang.Integer,java.util.List<RadiusAttribute<?>>>> vendorAttributes,
java.util.Map<java.lang.String,java.lang.Object> optionMap)
public RadiusPacket(byte code,
byte identifier)
code - - тип пакета (например, )identifier - - идентификатор пакета.public byte getCode()
ACCESS_REQUEST ACCOUNTING_REQUEST).public void setCode(byte code)
code - public boolean isRequest()
public void write(java.nio.ByteBuffer bb,
byte[] key)
throws java.security.InvalidKeyException,
java.security.NoSuchAlgorithmException
bb - - буферkey - - секрет наса.java.security.InvalidKeyExceptionjava.security.NoSuchAlgorithmExceptionpublic static RadiusPacket parse(java.nio.ByteBuffer bb) throws ru.bitel.bgbilling.common.BGException
bb - ru.bitel.bgbilling.common.BGExceptionpublic static RadiusPacket parse(java.nio.ByteBuffer bb, boolean move) throws ru.bitel.bgbilling.common.BGException
bb - ru.bitel.bgbilling.common.BGExceptionpublic RadiusPacket createResponse()
public <O> O getOption(RadiusPacket.RadiusPacketOption<O> option)
O - option - #setOption(RadiusPacketOption, Object)}, {@link VoiceIpNas#CALL_TYPE}, {@link VoiceIpNas#OPERATOR}, {@link RadiusPacketOption}public <O> O getOption(RadiusPacket.RadiusPacketOption<O> option, O value)
O - option - value - - значение по умолчанию#setOption(RadiusPacketOption, Object)}, {@link VoiceIpNas#CALL_TYPE}, {@link VoiceIpNas#OPERATOR}, {@link RadiusPacketOption}public <O> void setOption(RadiusPacket.RadiusPacketOption<O> option, O value)
O - option - value - VoiceIpNas#CALL_TYPE}, {@link VoiceIpNas#OPERATOR}, {@link RadiusPacketOption}public java.lang.String toString()
toString in class RadiusAttributeSetpublic java.lang.String getPacketTypeString()
public void fromPacket(RadiusPacket lastResponsePacket)
public Trace getTrace()
@Deprecated public java.lang.Object getOption(java.lang.String option)
option - @Deprecated
public void setOption(java.lang.String option,
java.lang.Object value)
option - value - @Deprecated public void setFlag(int flag)
flag - @Deprecated public int getFlag()
@Deprecated public void setPacketType(byte value)
setCode(byte)value - @Deprecated public void addAttribute(bitel.billing.server.radius.RadiusAttribute ra)
addAttribute(RadiusAttribute)@Deprecated public void setVendorAttribute(bitel.billing.server.radius.RadiusVendorAttribute rva)
RadiusAttributeSet.setAttribute(RadiusAttribute)@Deprecated public void addVendorAttribute(bitel.billing.server.radius.RadiusVendorAttribute rva)
addAttribute(RadiusAttribute)@Deprecated public void addVendorAttributes(java.util.List<bitel.billing.server.radius.RadiusVendorAttribute> attrs)
RadiusAttributeSet.addAttributes(RadiusAttributeSet)@Deprecated public void addAttributes(java.util.List<bitel.billing.server.radius.RadiusAttribute> attrs)
RadiusAttributeSet.addAttributes(RadiusAttributeSet)@Deprecated
public void setStringAttribute(int code,
java.lang.String value)
RadiusAttributeSet.setStringAttribute(int, int, String)@Deprecated
public void setIntAttribute(int code,
int value)
RadiusAttributeSet.setIntAttribute(int, int, int)@Deprecated
public void setByteAttribute(int code,
byte[] value)
RadiusAttributeSet.setByteAttribute(int, int, byte[])@Deprecated public byte[] getByteAttribute(int code)
RadiusAttributeSet.getByteAttribute(int, int, byte[])@Deprecated public java.lang.String getStringAttribute(int code)
RadiusAttributeSet.getStringAttribute(int, int, String)@Deprecated public int getIntAttribute(int code)
#getIntAttribute(int, int, int)@Deprecated public java.lang.String getVendorStringAttribute(int code)
RadiusAttributeSet.getStringAttribute(int, int, String)@Deprecated public int getVendorIntAttribute(int code)
#getIntAttribute(int, int, int)@Deprecated public java.util.List<RadiusAttribute<?>> getVendorAttributes(int vendor, int code)
RadiusAttributeSet.getAttributes(int, int)@Deprecated public java.util.List<RadiusAttribute<?>> getVendorAttributes(int vendor)
vendor - @Deprecated public int getPacketType()
getCode()@Deprecated public byte getPacketId()
public RadiusPacket clone()
clone in class java.lang.Object@Deprecated public byte[] getAuthenticatorBytes()
public byte[] getAuthenticator()
public void addOptions(RadiusPacket request)