ru.bitel.bgbilling.kernel.network.dhcp

## Class DhcpListenerWorker<D extends Idable>

- java.lang.Object
- - ru.bitel.common.worker.WorkerTask<C>
  - - ru.bitel.bgbilling.kernel.network.processor.ProcessorRequest<DhcpListenerWorkerContext>
    - - ru.bitel.bgbilling.kernel.network.dhcp.DhcpListenerWorker<D>

- All Implemented Interfaces:
    java.lang.Runnable

      public class DhcpListenerWorker<D extends Idable>
      extends ru.bitel.bgbilling.kernel.network.processor.ProcessorRequest<DhcpListenerWorkerContext>

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class ru.bitel.common.worker.WorkerTask

      `ru.bitel.common.worker.WorkerTask.BlockingExecutionHandler`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `agentDeviceId`
    `protected static java.net.InetAddress` | `broadcastAddress`
    `protected static java.net.InetSocketAddress` | `broadcastAddress68`
    `java.lang.String` | `circuitId`
    `long` | `connectionId`
    `protected D` | `device`
    `int` | `interfaceId`
    `int` | `relayDeviceId`
    `protected DhcpPacket` | `request`
    `protected DhcpPacket` | `response`

    - ### Fields inherited from class ru.bitel.bgbilling.kernel.network.processor.ProcessorRequest

      `clientAddress, data, millis`

    - ### Fields inherited from class ru.bitel.common.worker.WorkerTask

      `context`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DhcpListenerWorker(ru.bitel.bgbilling.kernel.network.processor.DatagramListener listener, DhcpProcessor<D> processor, java.net.SocketAddress clientAddress, long millis, java.nio.ByteBuffer data, int overloadLevel)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `D` | `getDevice()`
    `int` | `getOverloadLevel()` 0-9 текущая загруженность пула, >=10 - второй пул
    `DhcpPacket` | `getRequest()`
    `boolean` | `isConnectionModified()` Было ли соединение начато/остановлено при обработке данного `request`.
    `protected void` | `runImpl()`
    `void` | `setConnectionModified(boolean connectionModified)` Было ли соединение начато/остановлено при обработке данного `request`.
    `void` | `setDevice(D device)`
    `void` | `setResponse(DhcpPacket response)`

    - ### Methods inherited from class ru.bitel.bgbilling.kernel.network.processor.ProcessorRequest

      `send`

    - ### Methods inherited from class ru.bitel.common.worker.WorkerTask

      `newBlockingFixedThreadPool, newFixedThreadPool, newFixedThreadPool, newScheduledThreadPool, run, runSync, runSync, setContext`

    - ### Methods inherited from class java.lang.Object

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

    - ### Methods inherited from interface java.lang.Runnable

      `run`

- - ### Field Detail

    - #### interfaceId

          public int interfaceId

    - #### circuitId

          public java.lang.String circuitId

    - #### connectionId

          public long connectionId

    - #### relayDeviceId

          public int relayDeviceId

    - #### agentDeviceId

          public int agentDeviceId

    - #### device

          protected D extends Idable device

    - #### request

          protected DhcpPacket request

    - #### response

          protected DhcpPacket response

    - #### broadcastAddress

          protected static final java.net.InetAddress broadcastAddress

    - #### broadcastAddress68

          protected static final java.net.InetSocketAddress broadcastAddress68

  - ### Constructor Detail

    - #### DhcpListenerWorker

          public DhcpListenerWorker(ru.bitel.bgbilling.kernel.network.processor.DatagramListener listener,
                                    DhcpProcessor<D> processor,
                                    java.net.SocketAddress clientAddress,
                                    long millis,
                                    java.nio.ByteBuffer data,
                                    int overloadLevel)

  - ### Method Detail

    - #### getOverloadLevel

          public int getOverloadLevel()

      0-9 текущая загруженность пула, >=10 - второй пул
      Returns:

    - #### runImpl

          protected void runImpl()

      Specified by:
        `runImpl` in class `ru.bitel.common.worker.WorkerTask<DhcpListenerWorkerContext>`

    - #### setDevice

          public void setDevice(D device)

    - #### getDevice

          public D getDevice()

    - #### setResponse

          public void setResponse(DhcpPacket response)

    - #### isConnectionModified

          public boolean isConnectionModified()

      Было ли соединение начато/остановлено при обработке данного `request`.

    - #### setConnectionModified

          public void setConnectionModified(boolean connectionModified)

      Было ли соединение начато/остановлено при обработке данного `request`.

    - #### getRequest

          public DhcpPacket getRequest()