Class DhcpListener
java.lang.Object
ru.bitel.common.io.DatagramChannelListener
ru.bitel.bgbilling.kernel.network.processor.DatagramListener
ru.bitel.bgbilling.kernel.network.dhcp.DhcpListener
- All Implemented Interfaces:
java.lang.Runnable,ru.bitel.bgbilling.kernel.application.server.CommandListener,ru.bitel.bgbilling.kernel.application.server.ExtendedLifecycle,ru.bitel.bgbilling.kernel.application.server.Lifecycle,ru.bitel.bgbilling.kernel.network.processor.ProcessorListener,ru.bitel.common.worker.ThreadContextFactory<ru.bitel.common.worker.ThreadContext>
public class DhcpListener
extends ru.bitel.bgbilling.kernel.network.processor.DatagramListener
implements ru.bitel.bgbilling.kernel.network.processor.ProcessorListener, ru.bitel.bgbilling.kernel.application.server.CommandListener
-
Field Summary
Fields Modifier and Type Field Description protected ru.bitel.bgbilling.kernel.network.dhcp.datalog.hourly.DhcpHourlyDataLoggerdataLoggerprotected DhcpProcessor<Idable>processorFields inherited from class ru.bitel.bgbilling.kernel.network.processor.DatagramListener
maxQueueSize, rejectQueueSize, slow1QueueSize, slow2QueueSizeFields inherited from class ru.bitel.common.io.DatagramChannelListener
byteBufferCapacity, channel, directByteBuffer, host, inited, maxPacketSize, port, selector -
Constructor Summary
Constructors Constructor Description DhcpListener(java.lang.String host, int port, int byteBufferCapacity, DhcpProcessor<Idable> processor, ru.bitel.bgbilling.kernel.network.dhcp.datalog.hourly.DhcpHourlyDataLogger dataLogger, int threadCount, int maxQueueSize, java.lang.Boolean fallbackPool) -
Method Summary
Modifier and Type Method Description java.lang.StringexecuteCommand(java.lang.String cmd, java.lang.String param)booleanfallback(java.net.SocketAddress clientAddress, long millis, java.nio.ByteBuffer data, int overloadLevel)java.lang.StringgetCommandsHelp()ru.bitel.bgbilling.kernel.network.processor.ProcessorRequest<?>newRequest(java.net.SocketAddress clientAddress, long millis, java.nio.ByteBuffer data, int overloadLevel)ru.bitel.common.worker.ThreadContextnewThreadContext()Methods inherited from class ru.bitel.bgbilling.kernel.network.processor.DatagramListener
destroy, getActiveThreadCount, getCurrentThreadCount, getLastHourAverage, getLastMinuteCount, getLastTenMinutesAverage, getMaxQueueSize, getOverloadLevel, getQueueSize, getSlow1QueueSize, getSlow2QueueSize, getTaskCount, getThreadCount, init, onPacket, setMaxQueueSize, setThreadCount, start, stopMethods inherited from class ru.bitel.common.io.DatagramChannelListener
run, select, send, sendResponse, setReuseAddress, shutdownMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ru.bitel.bgbilling.kernel.network.processor.ProcessorListener
send
-
Field Details
-
processor
-
dataLogger
protected final ru.bitel.bgbilling.kernel.network.dhcp.datalog.hourly.DhcpHourlyDataLogger dataLogger
-
-
Constructor Details
-
DhcpListener
@ConstructorProperties({"host","port","recvBufferSize","processor","dataLogger","threadCount","maxQueueSize","fallbackPool"}) public DhcpListener(java.lang.String host, int port, int byteBufferCapacity, DhcpProcessor<Idable> processor, ru.bitel.bgbilling.kernel.network.dhcp.datalog.hourly.DhcpHourlyDataLogger dataLogger, int threadCount, int maxQueueSize, java.lang.Boolean fallbackPool)
-
-
Method Details
-
newThreadContext
public ru.bitel.common.worker.ThreadContext newThreadContext()- Specified by:
newThreadContextin interfaceru.bitel.common.worker.ThreadContextFactory<ru.bitel.common.worker.ThreadContext>
-
newRequest
public ru.bitel.bgbilling.kernel.network.processor.ProcessorRequest<?> newRequest(java.net.SocketAddress clientAddress, long millis, java.nio.ByteBuffer data, int overloadLevel)- Specified by:
newRequestin interfaceru.bitel.bgbilling.kernel.network.processor.ProcessorListener- Specified by:
newRequestin classru.bitel.bgbilling.kernel.network.processor.DatagramListener
-
getCommandsHelp
public java.lang.String getCommandsHelp()- Specified by:
getCommandsHelpin interfaceru.bitel.bgbilling.kernel.application.server.CommandListener
-
executeCommand
public java.lang.String executeCommand(java.lang.String cmd, java.lang.String param)- Specified by:
executeCommandin interfaceru.bitel.bgbilling.kernel.application.server.CommandListener
-
fallback
public boolean fallback(java.net.SocketAddress clientAddress, long millis, java.nio.ByteBuffer data, int overloadLevel)- Overrides:
fallbackin classru.bitel.bgbilling.kernel.network.processor.DatagramListener
-