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 -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic bitel.billing.server.util.RequestCounterDeprecated.static bitel.billing.server.util.RequestCounterDeprecated.static bitel.billing.server.util.RequestCounterDeprecated.static bitel.billing.server.util.RequestCounterDeprecated.static bitel.billing.server.util.RequestCounterDeprecated.static bitel.billing.server.util.RequestCounterDeprecated.static bitel.billing.server.util.RequestCounterDeprecated.static bitel.billing.server.util.RequestCounterDeprecated.protected final ru.bitel.bgbilling.kernel.network.radius.datalog.hourly.RadiusHourlyDataLoggerprotected final RadiusListener.Modeprotected final RadiusProcessor<?, N, ?> protected final Setupprotected Stringprotected StringFields inherited from class ru.bitel.common.io.DatagramChannelListener
byteBufferCapacity, channel, directByteBuffer, host, inited, maxPacketSize, port, selector -
Constructor Summary
ConstructorsConstructorDescriptionRadiusListener(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 TypeMethodDescriptionintintintlongintintlongintbooleanru.bitel.bgbilling.kernel.network.processor.ProcessorRequest<?> newRequest(SocketAddress clientAddress, long millis, ByteBuffer data, int overloadLevel) ru.bitel.common.worker.ThreadContextvoidonPacket(SocketAddress clientAddress, ByteBuffer data) voidsetMaxQueueSize(int maxQueueSize) voidsetSkipAccountingRequestsOnSlow(boolean skipAccountingRequestsOnSlow) voidsetThreadCount(int count) toString()protected voidtoString(StringBuilder result) Methods inherited from class ru.bitel.common.io.DatagramChannelListener
init, run, select, send, sendResponse, setReuseAddress, shutdownMethods inherited from class ru.bitel.bgbilling.kernel.base.server.logger.BGLogger
error, error, error, getLogger, logError, logError, warnMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ru.bitel.bgbilling.kernel.network.processor.ProcessorListener
send
-
Field Details
-
accountingStartCounter
Deprecated. -
accountingStopCounter
Deprecated. -
accountingUpdateCounter
Deprecated. -
authenticationAcceptCounter
Deprecated. -
authenticationRejectCounter
Deprecated. -
authenticationIgnoreCount
Deprecated. -
accountingUpdateIgnoreCount
Deprecated. -
antispamIgnoreCount
Deprecated. -
mode
-
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
-
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, если брать из setupmaxQueueSize- размер очереди или 0, если брать из setup
-
-
Method Details
-
newThreadContext
public ru.bitel.common.worker.ThreadContext newThreadContext()- Specified by:
newThreadContextin interfaceru.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:
newRequestin interfaceru.bitel.bgbilling.kernel.network.processor.ProcessorListener
-
onPacket
- Overrides:
onPacketin classru.bitel.common.io.DatagramChannelListener
-
startListener
-
toString
-
toString
-
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)
-