ru.bitel.bgbilling.modules.inet.api.common.bean

## Class InetConnection

- java.lang.Object
- - ru.bitel.bgbilling.modules.inet.api.common.bean.InetConnection

- All Implemented Interfaces:
    java.io.Serializable

      public class InetConnection
      extends java.lang.Object
      implements java.io.Serializable

  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static int` | `CREATED_BY_LOG_PROCESS`
    `static int` | `STATUS_ALIVE`
    `static int` | `STATUS_CLOSED`
    `static int` | `STATUS_FINISHED`
    `static int` | `STATUS_SUSPENDED`
    `static int` | `STATUS_WAIT`
    `static int` | `TYPE_CLOSED_BY_TIMEOUT`
    `static int` | `TYPE_DEVICE_STATE_CHANGED`
    `static int` | `TYPE_DHCPv4`
    `static int` | `TYPE_DHCPv6`
    `static int` | `TYPE_DISABLE_AT_START`
    `static int` | `TYPE_FLOW`
    `static int` | `TYPE_IP_SUBSCRIPTION`
    `static int` | `TYPE_NOT_FROM_START`
    `static int` | `TYPE_RADIUS`
    `static int` | `TYPE_SPLITTED`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InetConnection()`
    `InetConnection(InetSessionLog session)` Создание connection для нового соединения

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(java.lang.Object obj)`
    `int` | `getAccessCode()`
    `java.lang.String` | `getAcctSessionId()`
    `int` | `getAgentDeviceId()`
    `java.lang.String` | `getCalledStationId()`
    `java.lang.String` | `getCallingStationId()`
    `java.lang.Object` | `getCircuitId()`
    `java.util.Date` | `getConnectionStart()`
    `int` | `getConnectionStatus()`
    `java.util.Date` | `getConnectionStop()`
    `int` | `getContractId()`
    `int` | `getDeviceId()`
    `java.util.Set<java.lang.Integer>` | `getDeviceOptions()` Текущие опции для соединения.
    `int` | `getDevicePort()`
    `short` | `getDeviceState()`
    `long` | `getId()`
    `byte[]` | `getInetAddressBytes()`
    `int` | `getIpResourceId()`
    `long` | `getParentConnectionId()`
    `java.util.List<IpNet>` | `getRouteList()`
    `int` | `getServId()`
    `int` | `getType()`
    `java.lang.String` | `getUsername()`
    `int` | `hashCode()` hashCode является connectionId - чтобы можно было в hashmap хранить по одному connectionId
    `static boolean` | `isType(InetConnection connection, int type)`
    `void` | `setAccessCode(int accessCode)`
    `void` | `setAcctSessionId(java.lang.String acctSessionId)`
    `void` | `setAgentDeviceId(int agentDeviceId)`
    `void` | `setCalledStationId(java.lang.String calledStationId)`
    `void` | `setCallingStationId(java.lang.String callingStationId)`
    `void` | `setCircuitId(java.lang.Object circuitId)`
    `void` | `setConnectionStart(java.util.Date connectionStart)`
    `void` | `setConnectionStatus(int status)`
    `void` | `setConnectionStop(java.util.Date connectionStop)`
    `void` | `setContractId(int contractId)`
    `void` | `setDeviceId(int deviceId)`
    `void` | `setDeviceOptions(java.util.Set<java.lang.Integer> deviceOptions)` Установка текущих опций для соединения.
    `void` | `setDevicePort(int devicePort)`
    `void` | `setDeviceState(short deviceState)`
    `void` | `setId(long id)`
    `void` | `setInetAddressBytes(byte[] inetAddressBytes)`
    `void` | `setIpResourceId(int ipResourceId)`
    `void` | `setParentConnectionId(long parentConnectionId)`
    `void` | `setRouteList(java.util.List<IpNet> routeList)`
    `void` | `setServId(int inetServId)`
    `static void` | `setType(InetConnection connection, int type, boolean set)`
    `void` | `setType(int type)`
    `void` | `setUsername(java.lang.String username)`
    `java.lang.String` | `toString()`

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

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### TYPE_NOT_FROM_START

          public static final int TYPE_NOT_FROM_START

      See Also:
        Constant Field Values

    - #### TYPE_SPLITTED

          public static final int TYPE_SPLITTED

      See Also:
        Constant Field Values

    - #### TYPE_CLOSED_BY_TIMEOUT

          public static final int TYPE_CLOSED_BY_TIMEOUT

      See Also:
        Constant Field Values

    - #### TYPE_DEVICE_STATE_CHANGED

          public static final int TYPE_DEVICE_STATE_CHANGED

      See Also:
        Constant Field Values

    - #### CREATED_BY_LOG_PROCESS

          public static final int CREATED_BY_LOG_PROCESS

      See Also:
        Constant Field Values

    - #### TYPE_DISABLE_AT_START

          public static final int TYPE_DISABLE_AT_START

      See Also:
        Constant Field Values

    - #### TYPE_FLOW

          public static final int TYPE_FLOW

      See Also:
        Constant Field Values

    - #### TYPE_RADIUS

          public static final int TYPE_RADIUS

      See Also:
        Constant Field Values

    - #### TYPE_DHCPv4

          public static final int TYPE_DHCPv4

      See Also:
        Constant Field Values

    - #### TYPE_DHCPv6

          public static final int TYPE_DHCPv6

      See Also:
        Constant Field Values

    - #### TYPE_IP_SUBSCRIPTION

          public static final int TYPE_IP_SUBSCRIPTION

      See Also:
        Constant Field Values

    - #### STATUS_WAIT

          public static final int STATUS_WAIT

      See Also:
        Constant Field Values

    - #### STATUS_ALIVE

          public static final int STATUS_ALIVE

      See Also:
        Constant Field Values

    - #### STATUS_SUSPENDED

          public static final int STATUS_SUSPENDED

      See Also:
        Constant Field Values

    - #### STATUS_CLOSED

          public static final int STATUS_CLOSED

      See Also:
        Constant Field Values

    - #### STATUS_FINISHED

          public static final int STATUS_FINISHED

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### InetConnection

          public InetConnection()

    - #### InetConnection

          public InetConnection(InetSessionLog session)

      Создание connection для нового соединения
      Parameters:
        `session` -

  - ### Method Detail

    - #### equals

          public boolean equals(java.lang.Object obj)

      Overrides:
        `equals` in class `java.lang.Object`

    - #### hashCode

          public int hashCode()

      hashCode является connectionId - чтобы можно было в hashmap хранить по одному connectionId
      Overrides:
        `hashCode` in class `java.lang.Object`

    - #### getId

          public long getId()

    - #### setId

          public void setId(long id)

    - #### getConnectionStart

          public java.util.Date getConnectionStart()

    - #### setConnectionStart

          public void setConnectionStart(java.util.Date connectionStart)

    - #### getConnectionStop

          public java.util.Date getConnectionStop()

    - #### setConnectionStop

          public void setConnectionStop(java.util.Date connectionStop)

    - #### getContractId

          public int getContractId()

    - #### setContractId

          public void setContractId(int contractId)

    - #### getServId

          public int getServId()

    - #### setServId

          public void setServId(int inetServId)

    - #### getParentConnectionId

          public long getParentConnectionId()

    - #### setParentConnectionId

          public void setParentConnectionId(long parentConnectionId)

    - #### getDeviceId

          public int getDeviceId()

    - #### setDeviceId

          public void setDeviceId(int deviceId)

    - #### getDevicePort

          public int getDevicePort()

    - #### setDevicePort

          public void setDevicePort(int devicePort)

    - #### getAgentDeviceId

          public int getAgentDeviceId()

    - #### setAgentDeviceId

          public void setAgentDeviceId(int agentDeviceId)

    - #### getAcctSessionId

          public java.lang.String getAcctSessionId()

    - #### setAcctSessionId

          public void setAcctSessionId(java.lang.String acctSessionId)

    - #### getUsername

          public java.lang.String getUsername()

    - #### setUsername

          public void setUsername(java.lang.String username)

    - #### getCalledStationId

          public java.lang.String getCalledStationId()

    - #### setCalledStationId

          public void setCalledStationId(java.lang.String calledStationId)

    - #### getCallingStationId

          public java.lang.String getCallingStationId()

    - #### setCallingStationId

          public void setCallingStationId(java.lang.String callingStationId)

    - #### getCircuitId

          public java.lang.Object getCircuitId()

    - #### setCircuitId

          public void setCircuitId(java.lang.Object circuitId)

    - #### getIpResourceId

          public int getIpResourceId()

    - #### setIpResourceId

          public void setIpResourceId(int ipResourceId)

    - #### getInetAddressBytes

          public byte[] getInetAddressBytes()

    - #### setInetAddressBytes

          public void setInetAddressBytes(byte[] inetAddressBytes)

    - #### getRouteList

          public java.util.List<IpNet> getRouteList()

    - #### setRouteList

          public void setRouteList(java.util.List<IpNet> routeList)

    - #### getType

          public int getType()

    - #### setType

          public void setType(int type)

    - #### getAccessCode

          public int getAccessCode()

    - #### setAccessCode

          public void setAccessCode(int accessCode)

    - #### getConnectionStatus

          public int getConnectionStatus()

    - #### setConnectionStatus

          public void setConnectionStatus(int status)

    - #### getDeviceState

          public short getDeviceState()

    - #### setDeviceState

          public void setDeviceState(short deviceState)

    - #### getDeviceOptions

          public java.util.Set<java.lang.Integer> getDeviceOptions()

      Текущие опции для соединения.
      Нужно для call сессий (которых может быть несколко на один сервис)
      Returns:

    - #### setDeviceOptions

          public void setDeviceOptions(java.util.Set<java.lang.Integer> deviceOptions)

      Установка текущих опций для соединения.
      Parameters:
        `deviceOptions` -

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

    - #### setType

          public static void setType(InetConnection connection,
                                     int type,
                                     boolean set)

    - #### isType

          public static boolean isType(InetConnection connection,
                                       int type)