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:
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 final ru.bitel.bgbilling.kernel.network.dhcp.datalog.hourly.DhcpHourlyDataLogger
     
    protected final DhcpProcessor<Idable>
     

    Fields inherited from class ru.bitel.bgbilling.kernel.network.processor.DatagramListener

    maxQueueSize, rejectQueueSize, slow1QueueSize, slow2QueueSize

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

    byteBufferCapacity, channel, directByteBuffer, host, inited, maxPacketSize, port, selector
  • Constructor Summary

    Constructors
    Constructor
    Description
    DhcpListener(String host, int port, int byteBufferCapacity, DhcpProcessor<Idable> processor, ru.bitel.bgbilling.kernel.network.dhcp.datalog.hourly.DhcpHourlyDataLogger dataLogger, int threadCount, int maxQueueSize, Boolean fallbackPool)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    boolean
    fallback(SocketAddress clientAddress, long millis, ByteBuffer data, int overloadLevel)
     
     
    ru.bitel.bgbilling.kernel.network.processor.ProcessorRequest<?>
    newRequest(SocketAddress clientAddress, long millis, ByteBuffer data, int overloadLevel)
     
    ru.bitel.common.worker.ThreadContext
     

    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, stop

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

    run, select, send, sendResponse, setReuseAddress, shutdown

    Methods inherited from class java.lang.Object

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

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

    send
  • Field Details

    • processor

      protected final DhcpProcessor<Idable> 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(String host, int port, int byteBufferCapacity, DhcpProcessor<Idable> processor, ru.bitel.bgbilling.kernel.network.dhcp.datalog.hourly.DhcpHourlyDataLogger dataLogger, int threadCount, int maxQueueSize, Boolean fallbackPool)
  • Method Details

    • newThreadContext

      public ru.bitel.common.worker.ThreadContext newThreadContext()
      Specified by:
      newThreadContext in interface ru.bitel.common.worker.ThreadContextFactory<ru.bitel.common.worker.ThreadContext>
    • 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
      Specified by:
      newRequest in class ru.bitel.bgbilling.kernel.network.processor.DatagramListener
    • getCommandsHelp

      public String getCommandsHelp()
      Specified by:
      getCommandsHelp in interface ru.bitel.bgbilling.kernel.application.server.CommandListener
    • executeCommand

      public String executeCommand(String cmd, String param)
      Specified by:
      executeCommand in interface ru.bitel.bgbilling.kernel.application.server.CommandListener
    • fallback

      public boolean fallback(SocketAddress clientAddress, long millis, ByteBuffer data, int overloadLevel)
      Overrides:
      fallback in class ru.bitel.bgbilling.kernel.network.processor.DatagramListener