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

# Class RadiusListener<N extends ru.bitel.bgbilling.kernel.network.radius.nas.Nas<?,?,?>>

java.lang.Object
ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
ru.bitel.common.io.DatagramChannelListener
ru.bitel.bgbilling.kernel.network.radius.RadiusListener<N>

Type Parameters:
  `N` -

All Implemented Interfaces:
  `Runnable`, `ru.bitel.bgbilling.kernel.network.processor.ProcessorListener`, `ru.bitel.common.worker.ThreadContextFactory<ru.bitel.common.worker.ThreadContext>`

public class RadiusListener<N extends ru.bitel.bgbilling.kernel.network.radius.nas.Nas<?,?,?>> extends ru.bitel.common.io.DatagramChannelListener implements ru.bitel.bgbilling.kernel.network.processor.ProcessorListener
Слушатель радиус пакетов.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static enum`
  `RadiusListener.Mode`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static bitel.billing.server.util.RequestCounter`
  `accountingStartCounter`
  Deprecated.
  `static bitel.billing.server.util.RequestCounter`
  `accountingStopCounter`
  Deprecated.
  `static bitel.billing.server.util.RequestCounter`
  `accountingUpdateCounter`
  Deprecated.
  `static bitel.billing.server.util.RequestCounter`
  `accountingUpdateIgnoreCount`
  Deprecated.
  `static bitel.billing.server.util.RequestCounter`
  `antispamIgnoreCount`
  Deprecated.
  `static bitel.billing.server.util.RequestCounter`
  `authenticationAcceptCounter`
  Deprecated.
  `static bitel.billing.server.util.RequestCounter`
  `authenticationIgnoreCount`
  Deprecated.
  `static bitel.billing.server.util.RequestCounter`
  `authenticationRejectCounter`
  Deprecated.
  `protected final ru.bitel.bgbilling.kernel.network.radius.datalog.hourly.RadiusHourlyDataLogger`
  `dataLogger`
  `protected final RadiusListener.Mode`
  `mode`
  `protected final RadiusProcessor<?,N,?>`
  `processor`
  `protected final Setup`
  `setup`
  `protected String`
  `threadCountParamName`
  `protected String`
  `threadQueueParamName`

  ### Fields inherited from class ru.bitel.common.io.DatagramChannelListener

  `byteBufferCapacity, channel, directByteBuffer, host, inited, maxPacketSize, port, selector`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `RadiusListener(String host, int port, int byteBufferCapacity, int socketRcvBuf, RadiusProcessor<?,N,?> processor, RadiusListener.Mode mode, Setup setup, ru.bitel.bgbilling.kernel.network.radius.datalog.hourly.RadiusHourlyDataLogger dataLogger, int threadCount, int maxQueueSize, Boolean defaultAutoCommit)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `getActiveThreadCount()`
  `int`
  `getCurrentThreadCount()`
  `int`
  `getMaxQueueSize()`
  `long`
  `getQueueSize()`
  `int`
  `getSlow1QueueSize()`
  `int`
  `getSlow2QueueSize()`
  `long`
  `getTaskCount()`
  `int`
  `getThreadCount()`
  `boolean`
  `isSkipAccountingRequestsOnSlow()`
  `ru.bitel.bgbilling.kernel.network.processor.ProcessorRequest<?>`
  `newRequest(SocketAddress clientAddress, long millis, ByteBuffer data, int overloadLevel)`
  `ru.bitel.common.worker.ThreadContext`
  `newThreadContext()`
  `void`
  `onPacket(SocketAddress clientAddress, ByteBuffer data)`
  `void`
  `setMaxQueueSize(int maxQueueSize)`
  `void`
  `setSkipAccountingRequestsOnSlow(boolean skipAccountingRequestsOnSlow)`
  `void`
  `setThreadCount(int count)`
  `Thread`
  `startListener()`
  `String`
  `toString()`
  `protected void`
  `toString(StringBuilder result)`

  ### Methods inherited from class ru.bitel.common.io.DatagramChannelListener

  `init, run, select, send, sendResponse, setReuseAddress, shutdown`

  ### 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, wait, wait, wait`

  ### Methods inherited from interface ru.bitel.bgbilling.kernel.network.processor.ProcessorListener

  `send`

- ## Field Details

  - ### accountingStartCounter

    @Deprecated public static bitel.billing.server.util.RequestCounter accountingStartCounter
    Deprecated.

  - ### accountingStopCounter

    @Deprecated public static bitel.billing.server.util.RequestCounter accountingStopCounter
    Deprecated.

  - ### accountingUpdateCounter

    @Deprecated public static bitel.billing.server.util.RequestCounter accountingUpdateCounter
    Deprecated.

  - ### authenticationAcceptCounter

    @Deprecated public static bitel.billing.server.util.RequestCounter authenticationAcceptCounter
    Deprecated.

  - ### authenticationRejectCounter

    @Deprecated public static bitel.billing.server.util.RequestCounter authenticationRejectCounter
    Deprecated.

  - ### authenticationIgnoreCount

    @Deprecated public static bitel.billing.server.util.RequestCounter authenticationIgnoreCount
    Deprecated.

  - ### accountingUpdateIgnoreCount

    @Deprecated public static bitel.billing.server.util.RequestCounter accountingUpdateIgnoreCount
    Deprecated.

  - ### antispamIgnoreCount

    @Deprecated public static bitel.billing.server.util.RequestCounter antispamIgnoreCount
    Deprecated.

  - ### mode

    protected final RadiusListener.Mode mode

  - ### setup

    protected final Setup setup

  - ### processor

    protected final RadiusProcessor<?,N extends ru.bitel.bgbilling.kernel.network.radius.nas.Nas<?,?,?>,?> processor

  - ### dataLogger

    protected final ru.bitel.bgbilling.kernel.network.radius.datalog.hourly.RadiusHourlyDataLogger dataLogger

  - ### threadCountParamName

    protected String threadCountParamName

  - ### threadQueueParamName

    protected String threadQueueParamName

- ## Constructor Details

  - ### RadiusListener

    @ConstructorProperties({"host","port","recvBufferSize","soRCVBUF","processor","mode","setup","dataLogger","threadCount","maxQueueSize","defaultAutoCommit"}) public RadiusListener(String host, int port, int byteBufferCapacity, int socketRcvBuf, RadiusProcessor<?,N,?> processor, RadiusListener.Mode mode, Setup setup, ru.bitel.bgbilling.kernel.network.radius.datalog.hourly.RadiusHourlyDataLogger dataLogger, int threadCount, int maxQueueSize, Boolean defaultAutoCommit)
    Parameters:
      `host` -
      `port` -
      `byteBufferCapacity` - буфер на поток
      `socketRcvBuf` - рекомендуемый буфер сокета
      `processor` -
      `mode` -
      `setup` -
      `dataLogger` - RadiusHourlyDataLogger, если нужно сохранять логи
      `threadCount` - количество потоков или 0, если брать из setup
      `maxQueueSize` - размер очереди или 0, если брать из setup

- ## Method Details

  - ### newThreadContext

    public ru.bitel.common.worker.ThreadContext newThreadContext()
    Specified by:
      `newThreadContext` in interface `ru.bitel.common.worker.ThreadContextFactory<N extends ru.bitel.bgbilling.kernel.network.radius.nas.Nas<?,?,?>>`

  - ### newRequest

    public ru.bitel.bgbilling.kernel.network.processor.ProcessorRequest<?> newRequest(SocketAddress clientAddress, long millis, ByteBuffer data, int overloadLevel)
    Specified by:
      `newRequest` in interface `ru.bitel.bgbilling.kernel.network.processor.ProcessorListener`

  - ### onPacket

    public void onPacket(SocketAddress clientAddress, ByteBuffer data)
    Overrides:
      `onPacket` in class `ru.bitel.common.io.DatagramChannelListener`

  - ### startListener

    public Thread startListener()

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### toString

    protected void toString(StringBuilder result)

  - ### getThreadCount

    public int getThreadCount()

  - ### setThreadCount

    public void setThreadCount(int count)

  - ### getMaxQueueSize

    public int getMaxQueueSize()

  - ### setMaxQueueSize

    public void setMaxQueueSize(int maxQueueSize)

  - ### getSlow1QueueSize

    public int getSlow1QueueSize()

  - ### getSlow2QueueSize

    public int getSlow2QueueSize()

  - ### getCurrentThreadCount

    public int getCurrentThreadCount()

  - ### getActiveThreadCount

    public int getActiveThreadCount()

  - ### getTaskCount

    public long getTaskCount()

  - ### getQueueSize

    public long getQueueSize()

  - ### isSkipAccountingRequestsOnSlow

    public boolean isSkipAccountingRequestsOnSlow()

  - ### setSkipAccountingRequestsOnSlow

    public void setSkipAccountingRequestsOnSlow(boolean skipAccountingRequestsOnSlow)