Package ru.bitel.bgbilling.kernel.network.radius

# Class AbstractRadiusProcessor<C extends ru.bitel.bgbilling.kernel.network.radius.nas.NasConnection<?>,N extends ru.bitel.bgbilling.kernel.network.radius.nas.Nas<C,?,?>,P>

java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.bgbilling.kernel.network.processor.Processor
ru.bitel.bgbilling.kernel.network.radius.RadiusProcessor<C,N,P>
ru.bitel.bgbilling.kernel.network.radius.AbstractRadiusProcessor<C,N,P>

Type Parameters:
  `N` -
  `P` -

public abstract class AbstractRadiusProcessor<C extends ru.bitel.bgbilling.kernel.network.radius.nas.NasConnection<?>,N extends ru.bitel.bgbilling.kernel.network.radius.nas.Nas<C,?,?>,P> extends RadiusProcessor<C,N,P>
Расширенная версия процессора, здесь уже напрямую используется структура и api биллинга Используется только старым модулями dilaup и voiceip

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class ru.bitel.bgbilling.kernel.network.radius.RadiusProcessor

  `RadiusProcessor.ConnectionIterator<C extends ru.bitel.bgbilling.kernel.network.radius.nas.NasConnection<?>,N extends ru.bitel.bgbilling.kernel.network.radius.nas.Nas<C,?,?>>`

- ## Field Summary

  ### Fields inherited from class ru.bitel.bgbilling.kernel.network.radius.RadiusProcessor

  `accountingIgnoreCount, accountingStartCounter, accountingStopCounter, accountingUpdateCounter, accountingUpdateIgnoreCount, antispamIgnoreCount, authenticationAcceptCounter, authenticationIgnoreCount, authenticationRejectCounter, forwardAccessAnswer, forwardAccessRequest, forwardAccountingResponse, forwardAfterPreprocess, forwardAfterProcess, module, nasList, setup`

  ### Fields inherited from class ru.bitel.bgbilling.kernel.network.processor.Processor

  `applicationId, moduleId`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractRadiusProcessor(Setup setup, String module, int moduleId, ru.bitel.bgbilling.kernel.network.radius.nas.NasList<C,N> nasList)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected void`
  `accessRequestImpl(RadiusListenerWorker<N> req, N nas, RadiusPacket request, RadiusPacket response, Date date, RadiusSession<N,P> radiusSession, int logRecordId, ConnectionSet connectionSet)`
  `protected void`
  `addCommonStatusData(StringBuilder report)`
  `protected int`
  `authentication(RadiusListenerWorker<?> req, N nas, RadiusSession<N,P> session, RadiusPacket request, RadiusPacket response, ConnectionSet connectionSet, int log_record_id)`
  Обработка Access-Request разделяется на два этапа - аутентификацию и авторизацию.
  В данном методе должна проходить аутентификация.
  Этот метод вызывается один раз за радиус сессию, т.е. сразу на Access-Request, если сессии нет,
  или в конце обработки eap запросов.
  Метод вызывается из `RadiusSession`
  Внутри логики должен найтись логин, провериться пароль, и, если все нормально, вызваться `RadiusProcessor.authorization(RadiusListenerWorker, Nas, RadiusSession, RadiusPacket, RadiusPacket, ConnectionSet, int, ContractManager, Contract, Object, String)`
  `protected int`
  `authenticationImpl(RadiusListenerWorker<?> req, N nas, RadiusSession<N,P> session, RadiusPacket request, RadiusPacket response, ConnectionSet connectionSet, int log_record_id, boolean realtimeTariff)`
  `protected void`
  `checkLoginAndContract(Login login, Contract contract)`
  `protected boolean`
  `checkService(Connection con, int contractId, Set<Integer> sidSet)`
  `protected int`
  `executeError(Connection con, N nas, RadiusPacket request, RadiusPacket response, int cid, int lid, int errorCode, int log_record_id)`
  `protected abstract Login`
  `getLogin(Connection con, int cid, Card card)`
  `protected abstract Login`
  `getLogin(N nas, RadiusPacket req, RadiusPacket resp, Connection con, String userName)`
  `protected abstract ru.bitel.bgbilling.kernel.event.common.LocalEvent`
  `newRadiusAuthenticationEvent(RadiusPacket request, RadiusPacket response, RadiusSession<N,P> radiusSession, int logRecordId)`

  ### Methods inherited from class ru.bitel.bgbilling.kernel.network.radius.RadiusProcessor

  `accessRequest, accounting, accountingRequest, addToLog, afterNasListReload, authorization, connections, executeCommand, getAccessAcceptPerMinute, getAccessRejectPerMinute, getAccessRequestIgnorePerMinute, getAccountingStartPerMinute, getAccountingStopPerMinute, getAccountingUpdateIgnorePerMinute, getAccountingUpdatePerMinute, getActiveConnectionsCount, getAntispamIgnorePerMinute, getConnectionList, getNas, getNasList, getStatus, getStoppedConnectionCount, getSuspendedConnectionCount, insertToLog, newInstance, newRadiusSession, postprocessAccessRequest, postprocessAccountingRequest, preprocessAccessRequest, preprocessAccountingRequest, processConnections, reloadConfig, reloadNasList`

  ### Methods inherited from class ru.bitel.bgbilling.kernel.base.server.logger.BGLogger

  `error, error, error, getLogger, logError, logError`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AbstractRadiusProcessor

    public AbstractRadiusProcessor(Setup setup, String module, int moduleId, ru.bitel.bgbilling.kernel.network.radius.nas.NasList<C,N> nasList) throws ru.bitel.bgbilling.common.BGException
    Throws:
      `ru.bitel.bgbilling.common.BGException`

- ## Method Details

  - ### checkLoginAndContract

    protected void checkLoginAndContract(Login login, Contract contract)

  - ### executeError

    protected int executeError(Connection con, N nas, RadiusPacket request, RadiusPacket response, int cid, int lid, int errorCode, int log_record_id)

  - ### getLogin

    protected abstract Login getLogin(N nas, RadiusPacket req, RadiusPacket resp, Connection con, String userName)

  - ### getLogin

    protected abstract Login getLogin(Connection con, int cid, Card card)

  - ### accessRequestImpl

    protected void accessRequestImpl(RadiusListenerWorker<N> req, N nas, RadiusPacket request, RadiusPacket response, Date date, RadiusSession<N,P> radiusSession, int logRecordId, ConnectionSet connectionSet)
    Overrides:
      `accessRequestImpl` in class `RadiusProcessor<C extends ru.bitel.bgbilling.kernel.network.radius.nas.NasConnection<?>,N extends ru.bitel.bgbilling.kernel.network.radius.nas.Nas<C,?,?>,P>`

  - ### newRadiusAuthenticationEvent

    protected abstract ru.bitel.bgbilling.kernel.event.common.LocalEvent newRadiusAuthenticationEvent(RadiusPacket request, RadiusPacket response, RadiusSession<N,P> radiusSession, int logRecordId)

  - ### authentication

    protected int authentication(RadiusListenerWorker<?> req, N nas, RadiusSession<N,P> session, RadiusPacket request, RadiusPacket response, ConnectionSet connectionSet, int log_record_id)
    Description copied from class: `RadiusProcessor`
    Обработка Access-Request разделяется на два этапа - аутентификацию и авторизацию.
    В данном методе должна проходить аутентификация.
    Этот метод вызывается один раз за радиус сессию, т.е. сразу на Access-Request, если сессии нет,
    или в конце обработки eap запросов.
    Метод вызывается из `RadiusSession`
    Внутри логики должен найтись логин, провериться пароль, и, если все нормально, вызваться `RadiusProcessor.authorization(RadiusListenerWorker, Nas, RadiusSession, RadiusPacket, RadiusPacket, ConnectionSet, int, ContractManager, Contract, Object, String)`
    Specified by:
      `authentication` in class `RadiusProcessor<C extends ru.bitel.bgbilling.kernel.network.radius.nas.NasConnection<?>,N extends ru.bitel.bgbilling.kernel.network.radius.nas.Nas<C,?,?>,P>`

  - ### authenticationImpl

    protected int authenticationImpl(RadiusListenerWorker<?> req, N nas, RadiusSession<N,P> session, RadiusPacket request, RadiusPacket response, ConnectionSet connectionSet, int log_record_id, boolean realtimeTariff)

  - ### checkService

    protected boolean checkService(Connection con, int contractId, Set<Integer> sidSet)

  - ### addCommonStatusData

    protected void addCommonStatusData(StringBuilder report)