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

# Class UpgradeInfo

java.lang.Object
org.apache.coyote.http11.upgrade.UpgradeInfo

public class UpgradeInfo extends Object
Structure to hold statistical information about connections that have been established using the HTTP/1.1 upgrade mechanism. Bytes sent/received will always be populated. Messages sent/received will be populated if that makes sense for the protocol and the information is exposed by the protocol implementation.

- ## Constructor Summary

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

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `addBytesReceived(long bytesReceived)`
  Adds to the bytes received counter.
  `void`
  `addBytesSent(long bytesSent)`
  Adds to the bytes sent counter.
  `void`
  `addMsgsReceived(long msgsReceived)`
  Adds to the messages received counter.
  `void`
  `addMsgsSent(long msgsSent)`
  Adds to the messages sent counter.
  `long`
  `getBytesReceived()`
  Returns the number of bytes received.
  `long`
  `getBytesSent()`
  Returns the number of bytes sent.
  `UpgradeGroupInfo`
  `getGlobalProcessor()`
  Returns the parent group info.
  `long`
  `getMsgsReceived()`
  Returns the number of messages received.
  `long`
  `getMsgsSent()`
  Returns the number of messages sent.
  `void`
  `setBytesReceived(long bytesReceived)`
  Resets the bytes received counter.
  `void`
  `setBytesSent(long bytesSent)`
  Resets the bytes sent counter.
  `void`
  `setGroupInfo(UpgradeGroupInfo groupInfo)`
  Sets the parent group info.
  `void`
  `setMsgsReceived(long msgsReceived)`
  Resets the messages received counter.
  `void`
  `setMsgsSent(long msgsSent)`
  Resets the messages sent counter.

  ### Methods inherited from class Object

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

- ## Constructor Details

  - ### UpgradeInfo

    public UpgradeInfo()
    Constructs a new UpgradeInfo.

- ## Method Details

  - ### getGlobalProcessor

    public UpgradeGroupInfo getGlobalProcessor()
    Returns the parent group info.
    Returns:
      the group info

  - ### setGroupInfo

    public void setGroupInfo(UpgradeGroupInfo groupInfo)
    Sets the parent group info.
    Parameters:
      `groupInfo` - the group info

  - ### getBytesSent

    public long getBytesSent()
    Returns the number of bytes sent.
    Returns:
      the bytes sent

  - ### setBytesSent

    public void setBytesSent(long bytesSent)
    Resets the bytes sent counter.
    Parameters:
      `bytesSent` - the new value

  - ### addBytesSent

    public void addBytesSent(long bytesSent)
    Adds to the bytes sent counter.
    Parameters:
      `bytesSent` - the amount to add

  - ### getBytesReceived

    public long getBytesReceived()
    Returns the number of bytes received.
    Returns:
      the bytes received

  - ### setBytesReceived

    public void setBytesReceived(long bytesReceived)
    Resets the bytes received counter.
    Parameters:
      `bytesReceived` - the new value

  - ### addBytesReceived

    public void addBytesReceived(long bytesReceived)
    Adds to the bytes received counter.
    Parameters:
      `bytesReceived` - the amount to add

  - ### getMsgsSent

    public long getMsgsSent()
    Returns the number of messages sent.
    Returns:
      the messages sent

  - ### setMsgsSent

    public void setMsgsSent(long msgsSent)
    Resets the messages sent counter.
    Parameters:
      `msgsSent` - the new value

  - ### addMsgsSent

    public void addMsgsSent(long msgsSent)
    Adds to the messages sent counter.
    Parameters:
      `msgsSent` - the amount to add

  - ### getMsgsReceived

    public long getMsgsReceived()
    Returns the number of messages received.
    Returns:
      the messages received

  - ### setMsgsReceived

    public void setMsgsReceived(long msgsReceived)
    Resets the messages received counter.
    Parameters:
      `msgsReceived` - the new value

  - ### addMsgsReceived

    public void addMsgsReceived(long msgsReceived)
    Adds to the messages received counter.
    Parameters:
      `msgsReceived` - the amount to add