|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.nexaweb.server.pushconnection.ConnectionStatistics
This object keeps statistics on the data flowing over a PushConnection.
This information can be used to determine what FlushPolicy will
best suit your needs. The statistics may be obtained individually from
the get methods or XML reports may be obtained.
Single Object Report Example XML
<ConnectionStatistics sessionId="xxxxxx">
<TotalBytesSent>51920</TotalBytesSent>
<TotalCommunicationBytes>51920</TotalCommunicationBytes>
<TotalFlushBytes>0</TotalFlushBytes>
<FlushCount>0</FlushCount>
<ComminicationCount>150</ComminicationCount>
<MinCommunicationSize>164</MinCommunicationSize>
<MaxCommunicationSize>502</MaxCommunicationSize>
<AverageCommunicationSize>346.1333333333333</AverageCommunicationSize>
<MillisOpen>105452</MillisOpen>
</ConnectionStatistics>
All Instances Report Example XML
<AllConnectionStatistics>
<ConnectionStatistics sessionId="xxxxxx">
<TotalBytesSent>51920</TotalBytesSent>
<TotalCommunicationBytes>51920</TotalCommunicationBytes>
<TotalFlushBytes>0</TotalFlushBytes>
<FlushCount>0</FlushCount>
<ComminicationCount>150</ComminicationCount>
<MinCommunicationSize>164</MinCommunicationSize>
<MaxCommunicationSize>502</MaxCommunicationSize>
<AverageCommunicationSize>346.1333333333333</AverageCommunicationSize>
<MillisOpen>105452</MillisOpen>
</ConnectionStatistics>
<ConnectionStatistics sessionId="yyyyyy">
<TotalBytesSent>51920</TotalBytesSent>
<TotalCommunicationBytes>51920</TotalCommunicationBytes>
<TotalFlushBytes>0</TotalFlushBytes>
<FlushCount>0</FlushCount>
<ComminicationCount>150</ComminicationCount>
<MinCommunicationSize>164</MinCommunicationSize>
<MaxCommunicationSize>502</MaxCommunicationSize>
<AverageCommunicationSize>346.1333333333333</AverageCommunicationSize>
<MillisOpen>105452</MillisOpen>
</ConnectionStatistics>
</AllConnectionStatistics>
PushConnection| Constructor Summary | |
ConnectionStatistics(java.lang.String sessionId)
This constructor is used internally by Nexaweb. |
|
| Method Summary | |
static java.util.List |
getAllInstances()
Returns all instances of ConnectionStatistics. |
double |
getAverageCommunicationSize()
Returns the average size of all application communications to have been sent over the associated PushConnection. |
long |
getCommunicationCount()
Returns the number of application communications that have been sent over the associated PushConnection. |
long |
getFlushCount()
Returns the number of flushes that have been sent over the associated PushConnection. |
long |
getMaxCommunicationSize()
Returns the size of the largest application communication to have been sent over the associated PushConnection. |
long |
getMillisOpen()
Returns the number of milliseconds that this connection has been open. |
long |
getMinCommunicationSize()
Returns the size of the smallest application communication to have been sent over the associated PushConnection. |
java.lang.String |
getReportAsXml()
Returns an XML formatted report of all statistics. |
java.lang.String |
getReportAsXml(int level)
Returns an XML formatted report of all statistics. |
static java.lang.String |
getReportForAllInstancesAsXml()
Returns an XML report for all instances of ConnectionStatistics. |
static java.lang.String |
getReportForAllInstancesAsXml(int level)
Returns an XML report for all instances of ConnectionStatistics. |
long |
getTotalBytesSent()
Returns the total number of bytes that have been sent over the associated PushConnection. |
long |
getTotalCommunicationBytesSent()
Returns the total number of bytes that have been sent over the associated PushConnection as a result of application
data. |
long |
getTotalFlushBytesSent()
Returns the total number of bytes that have been sent over the associated PushConnection as a result of flushing by
a FlushPolicy. |
void |
onDataFlow(int length,
boolean isFlush)
This method gathers statistics on the data as it flows over the push connection. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ConnectionStatistics(java.lang.String sessionId)
sessionId - The session id of the session that owns the parent
PushConnection.| Method Detail |
public static java.util.List getAllInstances()
public static java.lang.String getReportForAllInstancesAsXml()
public static java.lang.String getReportForAllInstancesAsXml(int level)
public void onDataFlow(int length,
boolean isFlush)
length - The length of the data.isFlush - A boolean value indicating whether the data flowing
is flush data.public java.lang.String getReportAsXml()
public java.lang.String getReportAsXml(int level)
public long getTotalBytesSent()
PushConnection. The returned value is the
equivalent of the expression
getTotalCommunicationBytesSent() + getTotalFlushBytesSent()
public long getTotalCommunicationBytesSent()
PushConnection as a result of application
data. The returned value is the equivalent of the expression
getTotalBytesSent() - getTotalFlushBytesSent().
public long getTotalFlushBytesSent()
PushConnection as a result of flushing by
a FlushPolicy. The returned value is the equivalent
of the expression
getTotalBytesSent() - getTotalCommunicationBytesSent().
public long getFlushCount()
PushConnection.
public long getCommunicationCount()
PushConnection.
public long getMinCommunicationSize()
PushConnection.
public long getMaxCommunicationSize()
PushConnection.
public double getAverageCommunicationSize()
PushConnection.
public long getMillisOpen()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||