public final class InetNas extends ru.bitel.bgbilling.kernel.network.radius.nas.Nas<InetNasConnection,Preferences,InetRadiusProcessor>
| Modifier and Type | Field and Description |
|---|---|
static int |
START_FROM_ACCESS_NO
Не создавать запись в базе при access-accept.
|
static int |
START_FROM_ACCESS_WAIT
При access-accept создавать запись в базе.
|
static int |
START_FROM_UPDATE_BY_CLOSE_TIMEOUT
Если пришел update пакет без старта - начинать соединение со времени действительного старта, если оно не раньше чем сейчас минус connection.close.timeout,
иначе - создавать с текущего момента. |
static int |
START_FROM_UPDATE_NO
Если пришел update пакет без старта - не начинать соединение.
|
static int |
START_FROM_UPDATE_NOW
Если пришел update пакет без старта - начинать соединение с текущего момента.
|
| Constructor and Description |
|---|
InetNas(Preferences setup,
InetRadiusProcessor processor,
ru.bitel.bgbilling.modules.inet.access.Access access,
int id,
ru.bitel.bgbilling.kernel.network.radius.nas.Nas<InetNasConnection,Preferences,InetRadiusProcessor> oldNas,
java.net.InetAddress nasIPAddress,
java.lang.String nasIdentifier,
int vendorCode,
ParameterMap conf,
byte[] secret,
java.util.concurrent.ConcurrentMap<java.lang.Object,InetNasConnection> connections,
java.util.concurrent.ConcurrentMap<java.lang.Integer,InetNasConnection> portMap,
ru.bitel.bgbilling.modules.inet.runtime.device.InetDeviceRuntime deviceRuntime,
ru.bitel.bgbilling.kernel.network.radius.nas.NasConnectionInspector inspector) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRadiusAttributes(ru.bitel.bgbilling.kernel.container.managed.ServerContext context,
RadiusListenerWorker<?> req,
ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime servTypeRuntime,
ru.bitel.bgbilling.modules.inet.runtime.InetServRuntime servRuntime,
java.util.List<ru.bitel.bgbilling.modules.inet.runtime.InetServRuntime> childrenServRuntimes,
RadiusSession<InetNas,InetRadiusSessionParams> radiusSession,
RadiusPacket response,
java.util.Set<java.lang.Integer> optionSet,
java.util.Set<java.lang.Integer> attrSets) |
boolean |
canActivateCard(int cardActivateServiceId)
Можно ли на NAS'е активировать карту с такой услугой активации.
|
ru.bitel.bgbilling.modules.inet.runtime.ServSearchResult |
findServRuntime(ru.bitel.bgbilling.modules.inet.runtime.InetApplication application,
RadiusListenerWorker<?> req,
java.lang.String userName,
RadiusPacket request,
java.util.Date time) |
RadiusAccessRequestHandler |
getAccessRequestHandler() |
java.util.Set<java.lang.Integer> |
getActivateServiceIds()
Получение кодов услуг, которые можно активировать на данном NAS'е.
|
ru.bitel.bgbilling.modules.inet.runtime.device.InetDeviceRuntime |
getAgentDeviceRuntime(ru.bitel.bgbilling.modules.inet.runtime.InetApplication application,
RadiusListenerWorker<?> req,
RadiusPacket request)
Получение DHCP агента.
|
int |
getCardModuleId()
Код модуля карточек для активации карты.
|
int |
getCheckDuplicateSession(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime) |
boolean |
getCheckDuplicateSessionType(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime) |
protected InetNasConnection |
getConnection(java.lang.Object acctSessionId) |
long |
getConnectionCloseTimeout() |
int |
getConnectionStartFromAccessMode() |
int |
getConnectionStartFromUpdateMode() |
java.util.Set<java.lang.Integer> |
getDescendantIds() |
ru.bitel.bgbilling.modules.inet.runtime.device.InetDeviceRuntime |
getDeviceRuntime() |
int |
getDisableServId()
Id сервиса для подмены при
AccessCodes.INVALID_ACCOUNT |
DiscardedAccountingRequestHandler |
getDiscardedAccountingRequestHandler() |
RadiusAttributeSetFormatter |
getInvalidAccountErrorFormatter() |
int |
getIpResourceId(int agentDeviceId,
java.lang.String realm,
byte[] address,
java.util.Date start,
java.util.Set<java.lang.Integer> optionSet) |
java.lang.String |
getKeyPattern() |
InetNasConnection |
getParentConnection(RadiusPacket request) |
ProtocolHandler |
getProtocolHandler() |
long |
getRadiusAccessServLockTimeout() |
int |
getServDeviceLink(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime) |
int[][] |
getServSearchModes() |
int |
getSetIdentifier(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime) |
int |
getSetMacAddress(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime) |
java.lang.String[] |
getUsernameAndRealm(java.lang.String username) |
boolean |
isAddressFromRequest() |
boolean |
isCardCode(java.lang.String userName)
Проверяет, что логин числовой и что он в указанных в конфиге пределах.
|
boolean |
isConnectionStartFromUpdateIgnoreFramedIpLack() |
boolean |
isDisableRealmAccessCode(int error)
Переводить ли на реалм disable (rejectToAccept) с этой ошибкой или просто послать reject.
|
boolean |
isDisableRealmIpAddress() |
boolean |
isPasswordVerification(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime)
Нужно ли проверять пароль при Access-Request
|
boolean |
isRealmAllowed(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime servTypeRuntime,
java.lang.String realm)
Возвращает можно ли подключиться с указанным реалмом.
|
boolean |
isUnauthorizedSession(RadiusPacket request,
java.lang.String realm) |
boolean |
isUsernameIgnoreCase() |
java.util.concurrent.locks.Lock |
readLock() |
IpResourceReserve |
reserveIp(int agentDeviceId,
int servId,
java.lang.String username,
byte[] macAddress,
java.lang.String callingStationId,
java.lang.String identifier,
java.lang.String realm,
boolean[] resourceExist,
java.util.Set<java.lang.Integer> optionSet) |
InetNasConnection |
setConnection(InetNasConnection nasCon,
java.sql.Connection con,
java.sql.Connection conSlave) |
InetNasConnection |
setConnection(InetNasConnection nasCon,
RadiusPacket nullz,
java.sql.Connection con,
java.sql.Connection conSlave)
Deprecated.
|
InetNasConnection |
startConnection(RadiusListenerWorker<?> req,
RadiusPacket request,
RadiusPacket response,
ConnectionSet connectionSet,
java.util.Date time) |
void |
startWithParentAdd(java.util.Date time,
java.lang.String parentAcctSessionId,
RadiusPacket request)
Добавление пакета для отложенного старта сервисной сессии (чтобы она стартовала вместе с главной),
если главной сессии еще нет (т.е. старт пакеты пришли одновременно)
|
void |
startWithParentProcess(ConnectionSet connectionSet,
java.lang.String parentAcctSessionId) |
boolean |
stopConnection(java.sql.Connection con,
InetNasConnection nasCon,
long sessionTime,
boolean system,
long millis,
boolean force)
Останов соединения по радиус-пакету.
|
InetNasConnection |
stopConnection(RadiusListenerWorker<?> req,
RadiusPacket request,
RadiusPacket response,
ConnectionSet connectionSet) |
InetNasConnection |
updateConnection(RadiusListenerWorker<?> req,
RadiusPacket request,
RadiusPacket response,
ConnectionSet connectionSet) |
java.util.concurrent.locks.Lock |
writeLock() |
canActivateCard, connectionCount, connections, destroy, fanoutPacket, getAttributeSetMap, getConf, getDigestQop, getDigestRealm, getId, getNasIdentifier, getNasIPAddress, getRealmAttributeMap, getResponseSendMode, getScript, getSecret, getVendorCode, isCheckMessageAuthenticator, isMppeAddTypesAndPolicy, toStringpublic static final int START_FROM_ACCESS_NO
public static final int START_FROM_ACCESS_WAIT
public static final int START_FROM_UPDATE_NO
public static final int START_FROM_UPDATE_NOW
public static final int START_FROM_UPDATE_BY_CLOSE_TIMEOUT
public InetNas(Preferences setup, InetRadiusProcessor processor, ru.bitel.bgbilling.modules.inet.access.Access access, int id, ru.bitel.bgbilling.kernel.network.radius.nas.Nas<InetNasConnection,Preferences,InetRadiusProcessor> oldNas, java.net.InetAddress nasIPAddress, java.lang.String nasIdentifier, int vendorCode, ParameterMap conf, byte[] secret, java.util.concurrent.ConcurrentMap<java.lang.Object,InetNasConnection> connections, java.util.concurrent.ConcurrentMap<java.lang.Integer,InetNasConnection> portMap, ru.bitel.bgbilling.modules.inet.runtime.device.InetDeviceRuntime deviceRuntime, ru.bitel.bgbilling.kernel.network.radius.nas.NasConnectionInspector inspector)
public java.util.concurrent.locks.Lock readLock()
public java.util.concurrent.locks.Lock writeLock()
public RadiusAttributeSetFormatter getInvalidAccountErrorFormatter()
public ProtocolHandler getProtocolHandler()
public RadiusAccessRequestHandler getAccessRequestHandler()
public DiscardedAccountingRequestHandler getDiscardedAccountingRequestHandler()
public InetNasConnection getParentConnection(RadiusPacket request) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGExceptionprotected InetNasConnection getConnection(java.lang.Object acctSessionId)
@Deprecated public InetNasConnection setConnection(InetNasConnection nasCon, RadiusPacket nullz, java.sql.Connection con, java.sql.Connection conSlave)
setConnection in class ru.bitel.bgbilling.kernel.network.radius.nas.Nas<InetNasConnection,Preferences,InetRadiusProcessor>public InetNasConnection setConnection(InetNasConnection nasCon, java.sql.Connection con, java.sql.Connection conSlave)
public InetNasConnection startConnection(RadiusListenerWorker<?> req, RadiusPacket request, RadiusPacket response, ConnectionSet connectionSet, java.util.Date time)
startConnection in class ru.bitel.bgbilling.kernel.network.radius.nas.Nas<InetNasConnection,Preferences,InetRadiusProcessor>public InetNasConnection updateConnection(RadiusListenerWorker<?> req, RadiusPacket request, RadiusPacket response, ConnectionSet connectionSet)
updateConnection in class ru.bitel.bgbilling.kernel.network.radius.nas.Nas<InetNasConnection,Preferences,InetRadiusProcessor>public InetNasConnection stopConnection(RadiusListenerWorker<?> req, RadiusPacket request, RadiusPacket response, ConnectionSet connectionSet)
stopConnection in class ru.bitel.bgbilling.kernel.network.radius.nas.Nas<InetNasConnection,Preferences,InetRadiusProcessor>public boolean stopConnection(java.sql.Connection con,
InetNasConnection nasCon,
long sessionTime,
boolean system,
long millis,
boolean force)
throws ru.bitel.bgbilling.common.BGException
nasCon - con - conSlave - system - - если true - означает, что это обработка стоп пакета, а не события, пришедшего от другого accounting сервераru.bitel.bgbilling.common.BGExceptionpublic void addRadiusAttributes(ru.bitel.bgbilling.kernel.container.managed.ServerContext context,
RadiusListenerWorker<?> req,
ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime servTypeRuntime,
ru.bitel.bgbilling.modules.inet.runtime.InetServRuntime servRuntime,
java.util.List<ru.bitel.bgbilling.modules.inet.runtime.InetServRuntime> childrenServRuntimes,
RadiusSession<InetNas,InetRadiusSessionParams> radiusSession,
RadiusPacket response,
java.util.Set<java.lang.Integer> optionSet,
java.util.Set<java.lang.Integer> attrSets)
throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGExceptionpublic IpResourceReserve reserveIp(int agentDeviceId, int servId, java.lang.String username, byte[] macAddress, java.lang.String callingStationId, java.lang.String identifier, java.lang.String realm, boolean[] resourceExist, java.util.Set<java.lang.Integer> optionSet)
public boolean isUnauthorizedSession(RadiusPacket request, java.lang.String realm)
public boolean isUsernameIgnoreCase()
public java.lang.String[] getUsernameAndRealm(java.lang.String username)
public int getIpResourceId(int agentDeviceId,
java.lang.String realm,
byte[] address,
java.util.Date start,
java.util.Set<java.lang.Integer> optionSet)
throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGExceptionpublic boolean isDisableRealmAccessCode(int error)
error - public long getConnectionCloseTimeout()
public int getConnectionStartFromUpdateMode()
public void startWithParentAdd(java.util.Date time,
java.lang.String parentAcctSessionId,
RadiusPacket request)
time - parentAcctSessionId - request - public void startWithParentProcess(ConnectionSet connectionSet, java.lang.String parentAcctSessionId) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGExceptionpublic boolean isDisableRealmIpAddress()
public int getConnectionStartFromAccessMode()
public boolean isConnectionStartFromUpdateIgnoreFramedIpLack()
public boolean isRealmAllowed(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime servTypeRuntime,
java.lang.String realm)
servTypeRuntime - realm - public boolean canActivateCard(int cardActivateServiceId)
cardActivateServiceId - public java.util.Set<java.lang.Integer> getActivateServiceIds()
public int getCardModuleId()
public boolean isCardCode(java.lang.String userName)
userName - public int[][] getServSearchModes()
public ru.bitel.bgbilling.modules.inet.runtime.device.InetDeviceRuntime getAgentDeviceRuntime(ru.bitel.bgbilling.modules.inet.runtime.InetApplication application,
RadiusListenerWorker<?> req,
RadiusPacket request)
application - request - public ru.bitel.bgbilling.modules.inet.runtime.ServSearchResult findServRuntime(ru.bitel.bgbilling.modules.inet.runtime.InetApplication application,
RadiusListenerWorker<?> req,
java.lang.String userName,
RadiusPacket request,
java.util.Date time)
public boolean isPasswordVerification(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime)
public int getDisableServId()
AccessCodes.INVALID_ACCOUNTpublic int getSetMacAddress(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime)
public int getSetIdentifier(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime)
public int getServDeviceLink(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime)
public int getCheckDuplicateSession(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime)
public boolean getCheckDuplicateSessionType(ru.bitel.bgbilling.modules.inet.runtime.InetServTypeRuntime inetServTypeRuntime)
public java.util.Set<java.lang.Integer> getDescendantIds()
public long getRadiusAccessServLockTimeout()
public ru.bitel.bgbilling.modules.inet.runtime.device.InetDeviceRuntime getDeviceRuntime()
public java.lang.String getKeyPattern()
public boolean isAddressFromRequest()