Websphere MQ Everyplace

examples.queuemanager
Class MQeResourceMonitor

java.lang.Object
  |
  +--examples.queuemanager.MQeResourceMonitor
All Implemented Interfaces:
java.lang.Runnable

public class MQeResourceMonitor
extends java.lang.Object
implements java.lang.Runnable

A monitor which periodically outputs statistics snap-shots to the specified readable data stream.


Field Summary
static short[] version
          Which version of MQe was this example code taken from ?
 
Constructor Summary
MQeResourceMonitor()
           
 
Method Summary
 boolean isFormatCommaSeparatedFields()
          Returns the formatCommaSeparatedFields.
 boolean isFormatReadableMemoryData()
          Returns the formatReadableMemoryData.
 boolean isFormatReadableThreadData()
          Returns the formatReadableThreadData.
 boolean isFormatToTrace()
          Returns the formatToTrace.
 boolean isRunning()
          Indicates whether the monitor is running or not.
 void run()
          Background thread run method.
 void setFormatCommaSeparatedFields(boolean formatCommaSeparatedFields)
          Sets the formatCommaSeparatedFields.
 void setFormatReadableMemoryData(boolean formatReadableMemoryData)
          Sets the formatReadableMemoryData.
 void setFormatReadableThreadData(boolean formatReadableThreadData)
          Sets the formatReadableThreadData.
 void setFormatToTrace(boolean formatToTrace)
          Sets the formatToTrace.
 void setMilliSecsBetweenReadings(int milliSecsBetweenReadings)
           
 void setOutputStream(java.io.OutputStream outStream)
           
 void start()
          Called when the monitoring is supposed to start.
 void stop()
          Called when monitoring should be stopped.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

version

public static short[] version
Which version of MQe was this example code taken from ?

Constructor Detail

MQeResourceMonitor

public MQeResourceMonitor()
Method Detail

isRunning

public boolean isRunning()
Indicates whether the monitor is running or not.


setMilliSecsBetweenReadings

public void setMilliSecsBetweenReadings(int milliSecsBetweenReadings)

setOutputStream

public void setOutputStream(java.io.OutputStream outStream)

start

public void start()
Called when the monitoring is supposed to start.

Returns:
void
Throws:
java.lang.Exception

stop

public void stop()
Called when monitoring should be stopped.

Returns:
void
Throws:
java.lang.Exception

run

public void run()
Background thread run method. Triggers transmission every interval until thread is stopped.

Specified by:
run in interface java.lang.Runnable

isFormatCommaSeparatedFields

public boolean isFormatCommaSeparatedFields()
Returns the formatCommaSeparatedFields.

Returns:
boolean

isFormatReadableMemoryData

public boolean isFormatReadableMemoryData()
Returns the formatReadableMemoryData.

Returns:
boolean

isFormatReadableThreadData

public boolean isFormatReadableThreadData()
Returns the formatReadableThreadData.

Returns:
boolean

isFormatToTrace

public boolean isFormatToTrace()
Returns the formatToTrace.

Returns:
boolean

setFormatCommaSeparatedFields

public void setFormatCommaSeparatedFields(boolean formatCommaSeparatedFields)
Sets the formatCommaSeparatedFields.

Parameters:
formatCommaSeparatedFields - The formatCommaSeparatedFields to set

setFormatReadableMemoryData

public void setFormatReadableMemoryData(boolean formatReadableMemoryData)
Sets the formatReadableMemoryData.

Parameters:
formatReadableMemoryData - The formatReadableMemoryData to set

setFormatReadableThreadData

public void setFormatReadableThreadData(boolean formatReadableThreadData)
Sets the formatReadableThreadData.

Parameters:
formatReadableThreadData - The formatReadableThreadData to set

setFormatToTrace

public void setFormatToTrace(boolean formatToTrace)
Sets the formatToTrace.

Parameters:
formatToTrace - The formatToTrace to set

Websphere MQ Everyplace