Package org.apache.synapse.transport.passthru.jmx

## Class ConnectionsView

- java.lang.Object
- - org.apache.synapse.transport.passthru.jmx.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 | Description
    --- | ---
    `ConnectionsView​(String name)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `connected()` |
    `void` | `destroy()` |
    `protected void` | `disconnected()` |
    `protected void` | `exceptionOccured()` |
    `int` | `getActiveConnections()` |
    `int` | `getLast15MinuteConnections()` |
    `int` | `getLast24HourConnections()` |
    `int` | `getLast5MinuteConnections()` |
    `int` | `getLast8HourConnections()` |
    `int` | `getLastHourConnections()` |
    `int` | `getLastMinuteConnections()` |
    `Date` | `getLastResetTime()` |
    `Map` | `getRequestSizesMap()` |
    `Map` | `getResponseSizesMap()` |
    `int` | `getUnServedRequests()` |
    `protected void` | `notifyMessageSize​(long size, boolean isRequest)` |
    `protected void` | `requestReceived()` |
    `protected void` | `requestServed()` |
    `void` | `reset()` |
    `protected void` | `timeoutOccured()` |

    - ### 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)
                          throws org.apache.axis2.AxisFault

      Throws:
        `org.apache.axis2.AxisFault`

  - ### Method Detail

    - #### destroy

          public void destroy()

    - #### connected

          protected void connected()

    - #### disconnected

          protected void disconnected()

    - #### requestReceived

          protected void requestReceived()

    - #### requestServed

          protected void requestServed()

    - #### timeoutOccured

          protected void timeoutOccured()

    - #### exceptionOccured

          protected void exceptionOccured()

    - #### getUnServedRequests

          public int getUnServedRequests()

    - #### 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`