Package ru.bitel.bgbilling.kernel.network.dhcp

# 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.DhcpHourlyDataLogger` | `dataLogger` |
  `protected DhcpProcessor<Idable>` | `processor` |

  ### 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​(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.String` | `executeCommand​(java.lang.String cmd, java.lang.String param)` |
  `boolean` | `fallback​(java.net.SocketAddress clientAddress, long millis, java.nio.ByteBuffer data, int overloadLevel)` |
  `java.lang.String` | `getCommandsHelp()` |
  `ru.bitel.bgbilling.kernel.network.processor.ProcessorRequest<?>` | `newRequest​(java.net.SocketAddress clientAddress, long millis, java.nio.ByteBuffer data, int overloadLevel)` |
  `ru.bitel.common.worker.ThreadContext` | `newThreadContext()` |

  ### 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​(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:
      `newThreadContext` in interface `ru.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:
      `newRequest` in interface `ru.bitel.bgbilling.kernel.network.processor.ProcessorListener`
    Specified by:
      `newRequest` in class `ru.bitel.bgbilling.kernel.network.processor.DatagramListener`

  - ### getCommandsHelp

    public java.lang.String getCommandsHelp()
    Specified by:
      `getCommandsHelp` in interface `ru.bitel.bgbilling.kernel.application.server.CommandListener`

  - ### executeCommand

    public java.lang.String executeCommand​(java.lang.String cmd, java.lang.String param)
    Specified by:
      `executeCommand` in interface `ru.bitel.bgbilling.kernel.application.server.CommandListener`

  - ### fallback

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