N
- P
- public abstract class RadiusProcessor<C extends ru.bitel.bgbilling.kernel.network.radius.nas.NasConnection<?>,N extends ru.bitel.bgbilling.kernel.network.radius.nas.Nas<C,?,?>,P>
extends ru.bitel.bgbilling.kernel.network.processor.Processor
Modifier and Type | Class and Description |
---|---|
static interface |
RadiusProcessor.ConnectionIterator<C extends ru.bitel.bgbilling.kernel.network.radius.nas.NasConnection<?>,N extends ru.bitel.bgbilling.kernel.network.radius.nas.Nas<C,?,?>> |
Modifier and Type | Field and Description |
---|---|
bitel.billing.server.util.RequestCounter |
accountingIgnoreCount |
bitel.billing.server.util.RequestCounter |
accountingStartCounter |
bitel.billing.server.util.RequestCounter |
accountingStopCounter |
bitel.billing.server.util.RequestCounter |
accountingUpdateCounter |
bitel.billing.server.util.RequestCounter |
accountingUpdateIgnoreCount |
bitel.billing.server.util.RequestCounter |
antispamIgnoreCount |
bitel.billing.server.util.RequestCounter |
authenticationAcceptCounter |
bitel.billing.server.util.RequestCounter |
authenticationIgnoreCount |
bitel.billing.server.util.RequestCounter |
authenticationRejectCounter |
protected boolean |
forwardAccessAnswer |
protected boolean |
forwardAccessRequest |
protected boolean |
forwardAccountingResponse |
protected boolean |
forwardAfterPreprocess |
protected boolean |
forwardAfterProcess |
protected java.lang.String |
module |
protected ru.bitel.bgbilling.kernel.network.radius.nas.NasList<C,N> |
nasList |
protected Setup |
setup |
Constructor and Description |
---|
RadiusProcessor(Setup setup,
java.lang.String module,
int mid,
ru.bitel.bgbilling.kernel.network.radius.nas.NasList<C,N> nasList)
Deprecated.
|
RadiusProcessor(Setup setup,
java.lang.String module,
int mid,
ru.bitel.bgbilling.kernel.network.radius.nas.NasList<C,N> nasList,
boolean loadNasList,
boolean linkReload) |
Modifier and Type | Method and Description |
---|---|
void |
accessRequest(RadiusListenerWorker<N> req,
N nas,
int logRecordId,
RadiusPacket request,
RadiusPacket response,
ConnectionSet connectionSet)
Обработка Acсess-Request.
|
protected void |
accessRequestImpl(RadiusListenerWorker<N> req,
N nas,
RadiusPacket request,
RadiusPacket response,
java.util.Date date,
RadiusSession<N,P> radiusSession,
int logRecordId,
ConnectionSet connectionSet) |
protected C |
accounting(RadiusListenerWorker<N> req,
N nas,
RadiusPacket request,
RadiusPacket response,
ConnectionSet connectionSet,
java.util.Date time)
Обработка Accounting-Request по умолчанию.
|
C |
accountingRequest(RadiusListenerWorker<N> req,
N nas,
RadiusPacket request,
RadiusPacket response,
ConnectionSet connectionSet,
java.util.Date time)
Обработка пакета Accounting-Request
|
protected void |
addToLog(java.util.Date date,
RadiusPacket packet,
int recordId) |
protected void |
afterNasListReload() |
protected abstract int |
authentication(RadiusListenerWorker<?> req,
N nas,
RadiusSession<N,P> session,
RadiusPacket request,
RadiusPacket response,
ConnectionSet connectionSet,
int log_record_id)
Обработка Access-Request разделяется на два этапа - аутентификацию и авторизацию.
|
protected abstract int |
authorization(RadiusListenerWorker<?> req,
N nas,
RadiusSession<N,P> radiusSession,
RadiusPacket request,
RadiusPacket response,
ConnectionSet connectionSet,
int log_record_id,
ContractManager contractM,
Contract contract,
java.lang.Object login,
java.lang.String userName)
Авторизация клиента.
|
java.lang.Iterable<C> |
connections() |
abstract java.lang.String |
executeCommand(java.lang.String command,
java.lang.String params) |
int |
getAccessAcceptPerMinute() |
int |
getAccessRejectPerMinute() |
int |
getAccessRequestIgnorePerMinute() |
int |
getAccountingStartPerMinute() |
int |
getAccountingStopPerMinute() |
int |
getAccountingUpdateIgnorePerMinute() |
int |
getAccountingUpdatePerMinute() |
int |
getActiveConnectionsCount() |
int |
getAntispamIgnorePerMinute() |
protected java.util.List<C> |
getConnectionList() |
protected N |
getNas(java.net.SocketAddress clientAddress,
RadiusPacket packet)
Получение наса по радиус пакету.
|
ru.bitel.bgbilling.kernel.network.radius.nas.NasList<C,N> |
getNasList() |
abstract java.lang.String |
getStatus() |
int |
getStoppedConnectionCount() |
int |
getSuspendedConnectionCount() |
protected int |
insertToLog(java.util.Date date,
RadiusPacket packet) |
static RadiusProcessor<?,ru.bitel.bgbilling.kernel.network.radius.nas.Nas<?,?,?>,?> |
newInstance(java.lang.Class<? extends RadiusProcessor> clazz,
RadiusSetup setup,
int mid) |
protected abstract RadiusSession<N,P> |
newRadiusSession(java.sql.Connection con,
N nas,
RadiusPacket request,
RadiusSession.State state)
Создание новой радиус сессии.
|
protected void |
postprocessAccessRequest(N nas,
RadiusPacket request,
RadiusPacket response,
ConnectionSet connectionSet)
Постобработка Access-Request
По умолчанию - обработка скриптом предобработки наса.
|
protected void |
postprocessAccountingRequest(N nas,
RadiusPacket request,
RadiusPacket response,
ConnectionSet connectionSet)
Постобработка Accounting-Request
По умолчанию - обработка скриптом предобработки наса.
|
protected void |
preprocessAccessRequest(N nas,
RadiusPacket request,
RadiusPacket response,
ConnectionSet connectionSet)
Предобработка Access-Request
По умолчанию - обработка скриптом предобработки наса.
|
protected void |
preprocessAccountingRequest(N nas,
RadiusPacket request,
RadiusPacket response,
ConnectionSet connectionSet)
Предобработка Accounting-Request
По умолчанию - обработка скриптом предобработки наса.
|
void |
processConnections(RadiusProcessor.ConnectionIterator<C,N> iterator) |
protected void |
reloadConfig()
Перезагрузка конфигурации сервера + модуля.
|
protected void |
reloadNasList()
Корректная перезагрузка насов (конфига, инспекторов и т.п.).
|
public final bitel.billing.server.util.RequestCounter accountingStartCounter
public final bitel.billing.server.util.RequestCounter accountingStopCounter
public final bitel.billing.server.util.RequestCounter accountingUpdateCounter
public final bitel.billing.server.util.RequestCounter authenticationAcceptCounter
public final bitel.billing.server.util.RequestCounter authenticationRejectCounter
public final bitel.billing.server.util.RequestCounter authenticationIgnoreCount
public final bitel.billing.server.util.RequestCounter accountingIgnoreCount
public final bitel.billing.server.util.RequestCounter accountingUpdateIgnoreCount
public final bitel.billing.server.util.RequestCounter antispamIgnoreCount
protected final Setup setup
protected final java.lang.String module
protected final ru.bitel.bgbilling.kernel.network.radius.nas.NasList<C extends ru.bitel.bgbilling.kernel.network.radius.nas.NasConnection<?>,N extends ru.bitel.bgbilling.kernel.network.radius.nas.Nas<C,?,?>> nasList
protected volatile boolean forwardAfterPreprocess
protected volatile boolean forwardAfterProcess
protected volatile boolean forwardAccessRequest
protected volatile boolean forwardAccessAnswer
protected volatile boolean forwardAccountingResponse
@Deprecated public RadiusProcessor(Setup setup, java.lang.String module, int mid, ru.bitel.bgbilling.kernel.network.radius.nas.NasList<C,N> nasList) throws ru.bitel.bgbilling.common.BGException
ru.bitel.bgbilling.common.BGException
protected void reloadConfig()
protected void reloadNasList()
protected void afterNasListReload()
protected N getNas(java.net.SocketAddress clientAddress, RadiusPacket packet)
clientAddress
- packet
- public final java.lang.Iterable<C> connections()
public abstract java.lang.String executeCommand(java.lang.String command, java.lang.String params)
public void processConnections(RadiusProcessor.ConnectionIterator<C,N> iterator)
protected void preprocessAccessRequest(N nas, RadiusPacket request, RadiusPacket response, ConnectionSet connectionSet)
nas
- request
- response
- connectionSet
- экземпляры соединений с БД: master, slave, trashprotected void preprocessAccountingRequest(N nas, RadiusPacket request, RadiusPacket response, ConnectionSet connectionSet)
nas
- request
- response
- connectionSet
- экземпляры соединений с БД: master, slave, trashprotected void postprocessAccessRequest(N nas, RadiusPacket request, RadiusPacket response, ConnectionSet connectionSet)
nas
- request
- response
- connectionSet
- экземпляры соединений с БД: master, slave, trashprotected void postprocessAccountingRequest(N nas, RadiusPacket request, RadiusPacket response, ConnectionSet connectionSet)
nas
- request
- response
- connectionSet
- экземпляры соединений с БД: master, slave, trashprotected int insertToLog(java.util.Date date, RadiusPacket packet)
protected void addToLog(java.util.Date date, RadiusPacket packet, int recordId)
public void accessRequest(RadiusListenerWorker<N> req, N nas, int logRecordId, RadiusPacket request, RadiusPacket response, ConnectionSet connectionSet) throws ru.bitel.bgbilling.common.BGException
RadiusListenerWorker
req
- nas
- logRecordId
- request
- response
- connectionSet
- экземпляры соединений с БД: master, slave, trashru.bitel.bgbilling.common.BGException
protected void accessRequestImpl(RadiusListenerWorker<N> req, N nas, RadiusPacket request, RadiusPacket response, java.util.Date date, RadiusSession<N,P> radiusSession, int logRecordId, ConnectionSet connectionSet)
protected abstract RadiusSession<N,P> newRadiusSession(java.sql.Connection con, N nas, RadiusPacket request, RadiusSession.State state)
con
- nas
- TODOrequest
- state
- public C accountingRequest(RadiusListenerWorker<N> req, N nas, RadiusPacket request, RadiusPacket response, ConnectionSet connectionSet, java.util.Date time)
req
- TODOnas
- request
- response
- connectionSet
- экземпляры соединений с БД: master, slave, trashtime
- protected abstract int authentication(RadiusListenerWorker<?> req, N nas, RadiusSession<N,P> session, RadiusPacket request, RadiusPacket response, ConnectionSet connectionSet, int log_record_id)
RadiusSession
authorization(RadiusListenerWorker, Nas, RadiusSession, RadiusPacket, RadiusPacket, ConnectionSet, int, ContractManager, Contract, Object, String)
protected abstract int authorization(RadiusListenerWorker<?> req, N nas, RadiusSession<N,P> radiusSession, RadiusPacket request, RadiusPacket response, ConnectionSet connectionSet, int log_record_id, ContractManager contractM, Contract contract, java.lang.Object login, java.lang.String userName)
nas
- radiusSession
- request
- response
- connectionSet
- экземпляры соединений с БД: master, slave, trashlog_record_id
- contract
- login
- userName
- authentication(RadiusListenerWorker, Nas, RadiusSession, RadiusPacket, RadiusPacket, ConnectionSet, int)
protected C accounting(RadiusListenerWorker<N> req, N nas, RadiusPacket request, RadiusPacket response, ConnectionSet connectionSet, java.util.Date time)
req
- TODOnas
- request
- response
- connectionSet
- экземпляры соединений с БД: master, slave, trashpublic static RadiusProcessor<?,ru.bitel.bgbilling.kernel.network.radius.nas.Nas<?,?,?>,?> newInstance(java.lang.Class<? extends RadiusProcessor> clazz, RadiusSetup setup, int mid) throws java.lang.SecurityException, java.lang.NoSuchMethodException, java.lang.IllegalArgumentException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
java.lang.SecurityException
java.lang.NoSuchMethodException
java.lang.IllegalArgumentException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
protected java.util.List<C> getConnectionList()
public abstract java.lang.String getStatus()
public int getActiveConnectionsCount()
public int getSuspendedConnectionCount()
public int getStoppedConnectionCount()
public int getAccountingStartPerMinute()
public int getAccountingStopPerMinute()
public int getAccountingUpdatePerMinute()
public int getAccessAcceptPerMinute()
public int getAccessRejectPerMinute()
public int getAccessRequestIgnorePerMinute()
public int getAccountingUpdateIgnorePerMinute()
public int getAntispamIgnorePerMinute()