xmlBlaster 2.2.0 API

org.xmlBlaster.util.dispatch
Class DispatchStatistic

java.lang.Object
  extended by org.xmlBlaster.util.dispatch.DispatchStatistic
All Implemented Interfaces:
I_ProgressListener

public class DispatchStatistic
extends java.lang.Object
implements I_ProgressListener

Collecting data on how many messages / bytes are successfully delivered.


Field Summary
private  long currBytesRead
          The number of bytes read from the currently incoming message
private  long currBytesWritten
          The number of bytes written from the currently outgoing message
private  java.lang.String lastDeliveryException
          Holds the last exception text for JMX.
private  long numBytesToRead
          The size of the currently incoming message
private  long numBytesToWrite
          The size of the currently outgoing message
private  long numConnect
           
private  int numDeliveryExceptions
          Count the exceptions occurred since startup.
private  long numDisconnect
           
private  long numErase
           
private  long numGet
           
private  long numPublish
           
private  long numSubscribe
           
private  long numUnSubscribe
           
private  long numUpdate
           
private  long numUpdateOneway
           
private  long overallBytesRead
          Overall bytes received since startup
private  long overallBytesWritten
          Overall bytes send since startup
protected  long pingRoundTripDelay
           
protected  long roundTripDelay
           
private  boolean stalled
           
 
Constructor Summary
DispatchStatistic()
           
 
Method Summary
 void clearCurrentReads()
          Used to clear current (ongoing) read operations.
 void clearCurrentWrites()
          Used to clear current (ongoing) write operations.
 long getCurrBytesRead()
          The number of bytes read from the currently incoming message
 long getCurrBytesWritten()
          The number of bytes read from the currently outgoing message or response
 java.lang.String getLastDeliveryException()
          Holds the last exception text for JMX.
 long getNumBytesToRead()
          The size of the currently incoming message
 long getNumBytesToWrite()
          The size of the currently outgoing message or response
 long getNumConnect()
          How many connect requests sent.
 int getNumDeliveryExceptions()
          Count the exceptions occurred since startup.
 long getNumDisconnect()
          How many disconnect requests sent.
 long getNumErase()
          How many erase requests sent.
 long getNumGet()
          How many synchronous get requests sent.
 long getNumPublish()
          How many messages where published.
 long getNumSubscribe()
          How many subscribe requests sent.
 long getNumUnSubscribe()
          How many unSubscribe requests sent.
 long getNumUpdate()
          How many update where sent for this client, the sum of all session and subject queues of this clients.
 long getNumUpdateOneway()
          How many update where sent for this client, the sum of all session and subject queues of this clients.
 long getOverallBytesRead()
          Overall bytes received since startup
 long getOverallBytesWritten()
          Overall bytes send since startup
 long getPingRoundTripDelay()
           
 long getRoundTripDelay()
           
 void incrNumConnect(long count)
          Add count connect requests.
 void incrNumDeliveryExceptions(int count)
          Count the exceptions occurred since startup.
 void incrNumDisconnect(long count)
          Add count disconnect requests.
 void incrNumErase(long count)
          Add count erase requests.
 void incrNumGet(long count)
          Add count get requests.
 void incrNumPublish(long count)
          Add count messages which where published
 void incrNumSubscribe(long count)
          Add count subscribe requests.
 void incrNumUnSubscribe(long count)
          Add count unSubscribe requests.
 void incrNumUpdate(long count)
          Add count messages which where updated
 void incrNumUpdateOneway(long count)
          Add count messages which where updated
 boolean isStalled()
           
 boolean ongoingRead()
          returns true if a read operation is ongoing
 boolean ongoingWrite()
          returns true if a write operation is ongoing
 void progressRead(java.lang.String name, long currBytesRead, long numBytes)
          Implements I_ProgressListener interface.
 void progressWrite(java.lang.String name, long currBytesWritten, long numBytes)
          Implements I_ProgressListener interface.
 void setLastDeliveryException(java.lang.String lastDeliveryException)
          Set the last exception text for JMX.
 void setPingRoundTripDelay(long pingRoundTripDelay)
           
 void setRoundTripDelay(long roundTripDelay)
           
 void setStalled(boolean stalled)
           
 java.lang.String toXml(java.lang.String extraOffset)
          Dump state of this object into a XML ASCII string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numUpdate

private long numUpdate

numUpdateOneway

private long numUpdateOneway

numPublish

private long numPublish

numSubscribe

private long numSubscribe

numUnSubscribe

private long numUnSubscribe

numConnect

private long numConnect

numErase

private long numErase

numGet

private long numGet

numDisconnect

private long numDisconnect

lastDeliveryException

private java.lang.String lastDeliveryException
Holds the last exception text for JMX.


numDeliveryExceptions

private int numDeliveryExceptions
Count the exceptions occurred since startup.


currBytesRead

private long currBytesRead
The number of bytes read from the currently incoming message


numBytesToRead

private long numBytesToRead
The size of the currently incoming message


overallBytesRead

private long overallBytesRead
Overall bytes received since startup


currBytesWritten

private long currBytesWritten
The number of bytes written from the currently outgoing message


numBytesToWrite

private long numBytesToWrite
The size of the currently outgoing message


overallBytesWritten

private long overallBytesWritten
Overall bytes send since startup


pingRoundTripDelay

protected long pingRoundTripDelay

roundTripDelay

protected long roundTripDelay

stalled

private boolean stalled
Constructor Detail

DispatchStatistic

public DispatchStatistic()
Method Detail

progressRead

public void progressRead(java.lang.String name,
                         long currBytesRead,
                         long numBytes)
Implements I_ProgressListener interface.

Specified by:
progressRead in interface I_ProgressListener
Parameters:
name - A qualifying name about the incoming request, can be empty.
currBytesRead - The number of bytes received up to now
numBytes - The overall number of bytes

progressWrite

public void progressWrite(java.lang.String name,
                          long currBytesWritten,
                          long numBytes)
Implements I_ProgressListener interface.

Specified by:
progressWrite in interface I_ProgressListener
Parameters:
name - A qualifying name about the incoming request, can be empty.
currBytesWritten - The number of bytes send up to now
numBytes - The overall number of bytes

getCurrBytesRead

public final long getCurrBytesRead()
The number of bytes read from the currently incoming message


getNumBytesToRead

public final long getNumBytesToRead()
The size of the currently incoming message


getOverallBytesRead

public final long getOverallBytesRead()
Overall bytes received since startup


getCurrBytesWritten

public final long getCurrBytesWritten()
The number of bytes read from the currently outgoing message or response


getNumBytesToWrite

public final long getNumBytesToWrite()
The size of the currently outgoing message or response


getOverallBytesWritten

public final long getOverallBytesWritten()
Overall bytes send since startup


incrNumUpdate

public final void incrNumUpdate(long count)
Add count messages which where updated

Parameters:
count - The additional number of messages

getNumUpdate

public final long getNumUpdate()
How many update where sent for this client, the sum of all session and subject queues of this clients.


incrNumUpdateOneway

public final void incrNumUpdateOneway(long count)
Add count messages which where updated

Parameters:
count - The additional number of messages

getNumUpdateOneway

public final long getNumUpdateOneway()
How many update where sent for this client, the sum of all session and subject queues of this clients.


incrNumPublish

public final void incrNumPublish(long count)
Add count messages which where published

Parameters:
count - The additional number of messages

getNumPublish

public final long getNumPublish()
How many messages where published.


incrNumSubscribe

public final void incrNumSubscribe(long count)
Add count subscribe requests.

Parameters:
count - The additional number of subscribe requests

getNumSubscribe

public final long getNumSubscribe()
How many subscribe requests sent.


incrNumUnSubscribe

public final void incrNumUnSubscribe(long count)
Add count unSubscribe requests.

Parameters:
count - The additional number of unSubscribe requests

getNumUnSubscribe

public final long getNumUnSubscribe()
How many unSubscribe requests sent.


incrNumErase

public final void incrNumErase(long count)
Add count erase requests.

Parameters:
count - The additional number of erase requests

getNumErase

public final long getNumErase()
How many erase requests sent.


incrNumGet

public final void incrNumGet(long count)
Add count get requests.

Parameters:
count - The additional number of get equests

getNumGet

public final long getNumGet()
How many synchronous get requests sent.


incrNumConnect

public final void incrNumConnect(long count)
Add count connect requests.

Parameters:
count - The additional number of connect requests

getNumConnect

public final long getNumConnect()
How many connect requests sent.


incrNumDisconnect

public final void incrNumDisconnect(long count)
Add count disconnect requests.

Parameters:
count - The additional number of disconnect requests

getNumDisconnect

public final long getNumDisconnect()
How many disconnect requests sent.


getLastDeliveryException

public final java.lang.String getLastDeliveryException()
Holds the last exception text for JMX.


setLastDeliveryException

public final void setLastDeliveryException(java.lang.String lastDeliveryException)
Set the last exception text for JMX.


incrNumDeliveryExceptions

public final void incrNumDeliveryExceptions(int count)
Count the exceptions occurred since startup.


getNumDeliveryExceptions

public final int getNumDeliveryExceptions()
Count the exceptions occurred since startup.


toXml

public final java.lang.String toXml(java.lang.String extraOffset)
Dump state of this object into a XML ASCII string.

Parameters:
extraOffset - indenting of tags for nice output
Returns:
internal state of SessionInfo as a XML ASCII string

getPingRoundTripDelay

public long getPingRoundTripDelay()
Returns:
Returns the pingRoundTripDelay.

setPingRoundTripDelay

public void setPingRoundTripDelay(long pingRoundTripDelay)
Parameters:
pingRoundTripDelay - The pingRoundTripDelay to set.

getRoundTripDelay

public long getRoundTripDelay()
Returns:
Returns the roundTripDelay.

setRoundTripDelay

public void setRoundTripDelay(long roundTripDelay)
Parameters:
roundTripDelay - The roundTripDelay to set.

ongoingWrite

public boolean ongoingWrite()
returns true if a write operation is ongoing

Returns:

ongoingRead

public boolean ongoingRead()
returns true if a read operation is ongoing

Returns:

clearCurrentWrites

public void clearCurrentWrites()
Description copied from interface: I_ProgressListener
Used to clear current (ongoing) write operations. This is invoked if an exception occurs when writing.

Specified by:
clearCurrentWrites in interface I_ProgressListener

clearCurrentReads

public void clearCurrentReads()
Description copied from interface: I_ProgressListener
Used to clear current (ongoing) read operations. This is invoked if an exception occurs when writing.

Specified by:
clearCurrentReads in interface I_ProgressListener

isStalled

public boolean isStalled()

setStalled

public void setStalled(boolean stalled)

xmlBlaster 2.2.0 API

Copyright © 1999-2014 The xmlBlaster.org contributers.