org.apache.synapse.transport.nhttp.util

## Class ConnectionsView

- java.lang.Object
- - org.apache.synapse.transport.nhttp.util.ConnectionsView

- All Implemented Interfaces:
    ConnectionsViewMBean

      public class ConnectionsView
      extends Object
      implements ConnectionsViewMBean

  ConnectionsView MBean can be used to collect and monitor statistics on HTTP connections created by the NHTTP transport. Connection statistics can be divided into two categories, namely short term data and long term data. Short term data is related to the last 15 minutes of execution and they are updated every minute. Long term data is related to the last 24 hours of execution and they get updated every 5 minutes. In addition to the connection statistics this MBean also provides information on the request and response sizes received over the HTTP connections. All messages are divided into six categories based on their sizes and the resulting counts are made available as a table.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ConnectionsView(String name)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `connected()`
    `void` | `destroy()`
    `protected void` | `disconnected()`
    `int` | `getActiveConnections()`
    `Map` | `getActiveConnectionsPerHosts()`
    `int` | `getLast15MinuteConnections()`
    `int` | `getLast24HourConnections()`
    `int` | `getLast5MinuteConnections()`
    `int` | `getLast8HourConnections()`
    `int` | `getLastHourConnections()`
    `int` | `getLastMinuteConnections()`
    `Date` | `getLastResetTime()`
    `Map` | `getRequestSizesMap()`
    `Map` | `getResponseSizesMap()`
    `protected void` | `notifyMessageSize(long size, boolean isRequest)`
    `void` | `reset()`
    `void` | `setActiveConnectionPerHostEntry(Map<String,AtomicInteger> activeConnectionsPerHost)` Setter method for activeConnectionsPerHost, this will get called during connection creation and Connection shutdown operations

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

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

- - ### Constructor Detail

    - #### ConnectionsView

          public ConnectionsView(String name)

  - ### Method Detail

    - #### destroy

          public void destroy()

    - #### connected

          protected void connected()

    - #### disconnected

          protected void disconnected()

    - #### notifyMessageSize

          protected void notifyMessageSize(long size,
                                           boolean isRequest)

    - #### getActiveConnections

          public int getActiveConnections()

      Specified by:
        `getActiveConnections` in interface `ConnectionsViewMBean`

    - #### getLastMinuteConnections

          public int getLastMinuteConnections()

      Specified by:
        `getLastMinuteConnections` in interface `ConnectionsViewMBean`

    - #### getLast5MinuteConnections

          public int getLast5MinuteConnections()

      Specified by:
        `getLast5MinuteConnections` in interface `ConnectionsViewMBean`

    - #### getLast15MinuteConnections

          public int getLast15MinuteConnections()

      Specified by:
        `getLast15MinuteConnections` in interface `ConnectionsViewMBean`

    - #### getLastHourConnections

          public int getLastHourConnections()

      Specified by:
        `getLastHourConnections` in interface `ConnectionsViewMBean`

    - #### getLast8HourConnections

          public int getLast8HourConnections()

      Specified by:
        `getLast8HourConnections` in interface `ConnectionsViewMBean`

    - #### getLast24HourConnections

          public int getLast24HourConnections()

      Specified by:
        `getLast24HourConnections` in interface `ConnectionsViewMBean`

    - #### getRequestSizesMap

          public Map getRequestSizesMap()

      Specified by:
        `getRequestSizesMap` in interface `ConnectionsViewMBean`

    - #### getResponseSizesMap

          public Map getResponseSizesMap()

      Specified by:
        `getResponseSizesMap` in interface `ConnectionsViewMBean`

    - #### getLastResetTime

          public Date getLastResetTime()

      Specified by:
        `getLastResetTime` in interface `ConnectionsViewMBean`

    - #### reset

          public void reset()

      Specified by:
        `reset` in interface `ConnectionsViewMBean`

    - #### setActiveConnectionPerHostEntry

          public void setActiveConnectionPerHostEntry(Map<String,AtomicInteger> activeConnectionsPerHost)

      Setter method for activeConnectionsPerHost, this will get called during connection creation and Connection shutdown operations
      Parameters:
        `activeConnectionsPerHost` -

    - #### getActiveConnectionsPerHosts

          public Map getActiveConnectionsPerHosts()

      Specified by:
        `getActiveConnectionsPerHosts` in interface `ConnectionsViewMBean`

Copyright © 2005–2019 Apache Software Foundation. All rights reserved.