Package ru.bitel.bgbilling.modules.inet.server.ip

# Class AbstractInetServIpHandler

java.lang.Object
ru.bitel.bgbilling.modules.inet.server.ip.AbstractInetServIpHandler

All Implemented Interfaces:
  `InetServIpHandler`

Direct Known Subclasses:
  `InetServIpHandlerOldMode`

public abstract class AbstractInetServIpHandler extends Object implements InetServIpHandler

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `protected class`
  `AbstractInetServIpHandler.IpResult`

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected ru.bitel.bgbilling.kernel.container.managed.ServerContext`
  `context`
  `protected InetServService`
  `inetServService`
  `protected int`
  `moduleId`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AbstractInetServIpHandler()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `checkAddress(InetServ inetServ, InetServType servType)`
  Проверка введенных значений IP
  `void`
  `flowStaticSubnet(ru.bitel.bgbilling.modules.inet.server.runtime.InetServRuntime inetServRuntime, List<IpNet> result)`
  добавляем статическую подсеть в обсчет Netflow
  `protected void`
  `flowStaticSubnetIPv4(ru.bitel.bgbilling.modules.inet.server.runtime.InetServRuntime inetServRuntime, List<IpNet> result)`
  `protected InetServTypeIPMode`
  `getIPv4Mode(InetServType servType)`
  `protected InetServTypeIPMode`
  `getIPv6Mode(InetServType servType)`
  `void`
  `setAddress(InetServ inetServ, InetServType servType, InetServ oldInetServ, int subscriberId, String subscriberTitle)`
  Выделение IP из ресурсов
  `protected void`
  `setDelegatedIPv6Prefix(RadiusListenerWorker<?> radiusListenerWorker, RadiusPacket response, int ipResourceId, byte[] prefix, short prefixLength)`
  `protected void`
  `setFramedIPAddress(RadiusListenerWorker<?> radiusListenerWorker, RadiusPacket response, int ipResourceId, byte[] ipAddress)`
  `protected void`
  `setFramedIPv6Prefix(RadiusListenerWorker<?> radiusListenerWorker, RadiusPacket response, int ipResourceId, byte[] prefix, short prefixLength)`
  `void`
  `setInetServService(InetServService inetServService)`
  `void`
  `setModuleId(int moduleId)`
  `boolean`
  `setRadiusIp(InetServIpData inetServIpData, RadiusPacket request, RadiusPacket response)`
  `void`
  `setServerContext(ru.bitel.bgbilling.kernel.container.managed.ServerContext context)`
  `protected void`
  `subscriptionDelegatedIPv6Prefix(InetServ oldInetServ, InetServ newInetServ, int subscriberId, String subscriberTitle)`
  `protected void`
  `subscriptionFramedIPv6Prefix(InetServ oldInetServ, InetServ newInetServ, int subscriberId, String subscriberTitle)`
  `protected AbstractInetServIpHandler.IpResult`
  `tryReserveIPv4FromPool(InetServIpData inetServIpData, RadiusPacket request)`
  Пытаемся зарезервировать динамический ip в пуле адресов, если ранее не проставили ip из сервиса.

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

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

- ## Field Details

  - ### moduleId

    protected int moduleId

  - ### context

    protected ru.bitel.bgbilling.kernel.container.managed.ServerContext context

  - ### inetServService

    protected InetServService inetServService

- ## Constructor Details

  - ### AbstractInetServIpHandler

    public AbstractInetServIpHandler()

- ## Method Details

  - ### checkAddress

    public void checkAddress(InetServ inetServ, InetServType servType) throws ru.bitel.bgbilling.common.BGMessageException
    Description copied from interface: `InetServIpHandler`
    Проверка введенных значений IP
    Specified by:
      `checkAddress` in interface `InetServIpHandler`
    Parameters:
      `inetServ` -
      `servType` -
    Throws:
      `ru.bitel.bgbilling.common.BGMessageException`

  - ### setAddress

    public void setAddress(InetServ inetServ, InetServType servType, InetServ oldInetServ, int subscriberId, String subscriberTitle) throws Exception
    Description copied from interface: `InetServIpHandler`
    Выделение IP из ресурсов
    Specified by:
      `setAddress` in interface `InetServIpHandler`
    Parameters:
      `inetServ` -
      `servType` -
      `oldInetServ` -
      `subscriberId` -
      `subscriberTitle` -
    Throws:
      `Exception`

  - ### setRadiusIp

    public boolean setRadiusIp(InetServIpData inetServIpData, RadiusPacket request, RadiusPacket response)
    Specified by:
      `setRadiusIp` in interface `InetServIpHandler`
    Parameters:
      `inetServIpData` -
      `request` -
      `response` -
    Returns:

  - ### flowStaticSubnet

    public void flowStaticSubnet(ru.bitel.bgbilling.modules.inet.server.runtime.InetServRuntime inetServRuntime, List<IpNet> result)
    Description copied from interface: `InetServIpHandler`
    добавляем статическую подсеть в обсчет Netflow
    Specified by:
      `flowStaticSubnet` in interface `InetServIpHandler`
    Parameters:
      `inetServRuntime` -
      `result` -

  - ### setModuleId

    public void setModuleId(int moduleId)

  - ### setServerContext

    public void setServerContext(ru.bitel.bgbilling.kernel.container.managed.ServerContext context)

  - ### setInetServService

    public void setInetServService(InetServService inetServService)

  - ### flowStaticSubnetIPv4

    protected void flowStaticSubnetIPv4(ru.bitel.bgbilling.modules.inet.server.runtime.InetServRuntime inetServRuntime, List<IpNet> result)

  - ### setFramedIPAddress

    protected void setFramedIPAddress(RadiusListenerWorker<?> radiusListenerWorker, RadiusPacket response, int ipResourceId, byte[] ipAddress)

  - ### setFramedIPv6Prefix

    protected void setFramedIPv6Prefix(RadiusListenerWorker<?> radiusListenerWorker, RadiusPacket response, int ipResourceId, byte[] prefix, short prefixLength)

  - ### setDelegatedIPv6Prefix

    protected void setDelegatedIPv6Prefix(RadiusListenerWorker<?> radiusListenerWorker, RadiusPacket response, int ipResourceId, byte[] prefix, short prefixLength)

  - ### getIPv4Mode

    protected InetServTypeIPMode getIPv4Mode(InetServType servType)

  - ### getIPv6Mode

    protected InetServTypeIPMode getIPv6Mode(InetServType servType)

  - ### subscriptionFramedIPv6Prefix

    protected void subscriptionFramedIPv6Prefix(InetServ oldInetServ, InetServ newInetServ, int subscriberId, String subscriberTitle) throws Exception
    Throws:
      `Exception`

  - ### subscriptionDelegatedIPv6Prefix

    protected void subscriptionDelegatedIPv6Prefix(InetServ oldInetServ, InetServ newInetServ, int subscriberId, String subscriberTitle) throws Exception
    Throws:
      `Exception`

  - ### tryReserveIPv4FromPool

    protected AbstractInetServIpHandler.IpResult tryReserveIPv4FromPool(InetServIpData inetServIpData, RadiusPacket request)
    Пытаемся зарезервировать динамический ip в пуле адресов, если ранее не проставили ip из сервиса.
    Parameters:
      `inetServIpData` -
      `request` -
      `result` - результат процесса выдачи ip-адреса. там проставляются различные id, флаги, префиксы и т.д.