UpgradeGroupInfo (Apache Tomcat 9.0.121 API Documentation)
Description: declaration: package: org.apache.coyote.http11.upgrade, class: UpgradeGroupInfo

# Class UpgradeGroupInfo

java.lang.Object
org.apache.tomcat.util.modeler.BaseModelMBean
org.apache.coyote.http11.upgrade.UpgradeGroupInfo

All Implemented Interfaces:
  `DynamicMBean, MBeanRegistration, ModelMBeanNotificationBroadcaster, NotificationBroadcaster`

public class UpgradeGroupInfo extends BaseModelMBean
This aggregates the data collected from each UpgradeInfo instance.

- ## Field Summary

  ### Fields inherited from class BaseModelMBean

  `attributeBroadcaster, generalBroadcaster, managedBean, oname, resource, resourceType`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `UpgradeGroupInfo()`
  Constructs a new UpgradeGroupInfo.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addUpgradeInfo(UpgradeInfo ui)`
  Adds an active upgrade connection to this group.
  `long`
  `getBytesReceived()`
  Returns the total bytes received across all connections.
  `long`
  `getBytesSent()`
  Returns the total bytes sent across all connections.
  `long`
  `getMsgsReceived()`
  Returns the total messages received across all connections.
  `long`
  `getMsgsSent()`
  Returns the total messages sent across all connections.
  `void`
  `removeUpgradeInfo(UpgradeInfo ui)`
  Removes an upgrade connection from this group.
  `void`
  `resetCounters()`
  Resets all counters to zero.
  `void`
  `setBytesReceived(long bytesReceived)`
  Resets the bytes received counter.
  `void`
  `setBytesSent(long bytesSent)`
  Resets the bytes sent counter.
  `void`
  `setMsgsReceived(long msgsReceived)`
  Resets the messages received counter.
  `void`
  `setMsgsSent(long msgsSent)`
  Resets the messages sent counter.

  ### Methods inherited from class BaseModelMBean

  `addAttributeChangeNotificationListener, addNotificationListener, getAttribute, getAttributes, getClassName, getJmxName, getManagedResource, getMBeanInfo, getModelerType, getNotificationInfo, getObjectName, invoke, postDeregister, postRegister, preDeregister, preRegister, removeAttributeChangeNotificationListener, removeNotificationListener, sendAttributeChangeNotification, sendAttributeChangeNotification, sendNotification, sendNotification, setAttribute, setAttributes, setManagedBean, setManagedResource, toString`

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### UpgradeGroupInfo

    public UpgradeGroupInfo()
    Constructs a new UpgradeGroupInfo.

- ## Method Details

  - ### addUpgradeInfo

    public void addUpgradeInfo(UpgradeInfo ui)
    Adds an active upgrade connection to this group.
    Parameters:
      `ui` - the upgrade connection

  - ### removeUpgradeInfo

    public void removeUpgradeInfo(UpgradeInfo ui)
    Removes an upgrade connection from this group.
    Parameters:
      `ui` - the upgrade connection to remove

  - ### getBytesReceived

    public long getBytesReceived()
    Returns the total bytes received across all connections.
    Returns:
      the total bytes received

  - ### setBytesReceived

    public void setBytesReceived(long bytesReceived)
    Resets the bytes received counter.
    Parameters:
      `bytesReceived` - the value to restore (0 to reset completely, positive values are added to the bytes received counter)

  - ### getBytesSent

    public long getBytesSent()
    Returns the total bytes sent across all connections.
    Returns:
      the total bytes sent

  - ### setBytesSent

    public void setBytesSent(long bytesSent)
    Resets the bytes sent counter.
    Parameters:
      `bytesSent` - the value to restore (0 to reset completely, positive values are added to the bytes sent counter)

  - ### getMsgsReceived

    public long getMsgsReceived()
    Returns the total messages received across all connections.
    Returns:
      the total messages received

  - ### setMsgsReceived

    public void setMsgsReceived(long msgsReceived)
    Resets the messages received counter.
    Parameters:
      `msgsReceived` - the value to restore (0 to reset completely, positive values are added to the messages received counter)

  - ### getMsgsSent

    public long getMsgsSent()
    Returns the total messages sent across all connections.
    Returns:
      the total messages sent

  - ### setMsgsSent

    public void setMsgsSent(long msgsSent)
    Resets the messages sent counter.
    Parameters:
      `msgsSent` - the value to restore (0 to reset completely, positive values are added to the message sent counter)

  - ### resetCounters

    public void resetCounters()
    Resets all counters to zero.