Package org.apache.coyote.http11.upgrade
Class UpgradeInfo
- java.lang.Object
-
- org.apache.coyote.http11.upgrade.UpgradeInfo
-
public class UpgradeInfo extends java.lang.ObjectStructure 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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBytesReceived(long bytesReceived)Adds to the bytes received counter.voidaddBytesSent(long bytesSent)Adds to the bytes sent counter.voidaddMsgsReceived(long msgsReceived)Adds to the messages received counter.voidaddMsgsSent(long msgsSent)Adds to the messages sent counter.longgetBytesReceived()Returns the number of bytes received.longgetBytesSent()Returns the number of bytes sent.UpgradeGroupInfogetGlobalProcessor()Returns the parent group info.longgetMsgsReceived()Returns the number of messages received.longgetMsgsSent()Returns the number of messages sent.voidsetBytesReceived(long bytesReceived)Resets the bytes received counter.voidsetBytesSent(long bytesSent)Resets the bytes sent counter.voidsetGroupInfo(UpgradeGroupInfo groupInfo)Sets the parent group info.voidsetMsgsReceived(long msgsReceived)Resets the messages received counter.voidsetMsgsSent(long msgsSent)Resets the messages sent counter.
-
-
-
Method Detail
-
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
-
-