com.ibm.iseries.collectionservices
Class DataCollectionRequest

java.lang.Object
  |
  +--com.ibm.iseries.collectionservices.DataCollectionRequest

public class DataCollectionRequest
extends java.lang.Object

This class defines a set of parameters, which are passed to methods of DataCollectionProgram interface.

This class does not have any methods. It's function is only to pass information in its public fields.

DataCollectionProgram interface is used by Collection Services support for user-defined categories.
For more information about user-defined categories and Collection Services support for data collection programs written in Java, go to iSeries Information Center.

Since:
V5R2M0

Field Summary
 int bytesProvided
          In this field data collection method indicates how many bytes from collectedData array should be used by Collection Services.
static int CALL_CONTINUE
          This is a constant value for requestModifier field.
static int CALL_NORMAL
          This is a constant value for requestModifier field.
 java.lang.String categoryName
          Name of a user-defined category for which data collection is performed.
 java.lang.String categoryParameter
          This is a parameter string, specified when user-defined category was registered.
 byte[] collectedData
          In this field data collection method returns collected data.
 int dataLimit
          This is a maximum number of bytes of data collection method is allowed to return in collectedData parameter.
 java.lang.String format
          Format of a parameter structure passed to a data collection program.
static java.lang.String FORMAT_01
          This is a constant value for format field,
 byte[] intervalKey
          Record key of a repository record about to be written into Management Collection Object.
 long intervalTimestamp
          Time when Collection Services collector initiated a particular request in a system timestamp format.
static int MORE_DATA
          This is a constant value for moreData field.
 int moreData
          More data flag.
static int NO_MORE_DATA
          This is a constant value for moreData field.
 int offset
          In this field data collection method indicates where Collection Services should start copying data from collectedData array.
 int requestModifier
          This field modifies a meaning of a request for which a method was called.
 
Constructor Summary
DataCollectionRequest()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

format

public java.lang.String format
Format of a parameter structure passed to a data collection program. In V5R2 "PMDC0100" is the only format supported. In a future Collection Services may support other formats.

See also static field FORMAT_01.


requestModifier

public int requestModifier
This field modifies a meaning of a request for which a method was called. This field can have two values:

Collection Services will call the same method again with the same parameters and requestModifier field set to 20, if previous call to a method returns moreData field set to a non-zero value.
In this way data collection program may return collected data to Collection Services as a series of smaller portions, rather than in a single large piece.

See also static fields CALL_NORMAL and CALL_CONTINUE.


categoryName

public java.lang.String categoryName
Name of a user-defined category for which data collection is performed. This name was previously registered via Collection Services Category Registration API.

categoryParameter

public java.lang.String categoryParameter
This is a parameter string, specified when user-defined category was registered. This parameter string can be used to pass customization information to a data collection program.

intervalKey

public byte[] intervalKey
Record key of a repository record about to be written into Management Collection Object.
Format of this field is "DDHHMMSS", where:

Record keys of interval records, with the possible exception of the key of the first record in a collection period, are normalized to collection interval boundary. For example, for 15 minute collection interval, "00124500" and "00223000" are valid record keys, while "00131014" is not.

Note: contents of this field is in EBCDIC, exactly as record key is stored in a Management Collection Object.

Note: This field is provided for reference only.


intervalTimestamp

public long intervalTimestamp
Time when Collection Services collector initiated a particular request in a system timestamp format.
Normally this time is close to a time, implied by an intervalKey field, but unlike the latter, this time is not normalized.

See Convert Date and Time Format (QWCCVTDT) API for details about time formats.

Note: This field is provided for reference only.


dataLimit

public int dataLimit
This is a maximum number of bytes of data collection method is allowed to return in collectedData parameter. If data collection program will return more data, only first dataLimit bytes will be used. The rest will be ignored.
If data collection method needs to return more data, than dataLimit field allows, moreData field should be used.

moreData

public int moreData
More data flag.
By setting this field to a non-zero value, data collection method may indicate to Collection Services, that it has more data to return for this request.
Collection Services will transfer previously returned data to a current repository record, and then call the same method again with all parameters identical to previous call, except that requestModifier field will be set to 20.
Data collection method may use moreData field as many times as needed to transfer all collected data to Collection Services.

This field is set to zero at entry to a method.

See also static fields MORE_DATA and NO_MORE_DATA.


collectedData

public byte[] collectedData
In this field data collection method returns collected data. It is a reference to a byte array, which contains data to be stored in a repository record of a Management Collection Object.

If bytesProvided field is set to 0 or collectedData field is set to null after doBegin() or doEnd() methods, collection control record will not be created.

If bytesProvided field is set to 0 or
collectedData field is set to null after doCollect() method, Collection Services will still create an interval record with no data stored.

At entry to a method, this field is set to null.

See DataCollectionProgram interface for the description of mentioned methods.

Note: for performance reasons, methods are encouraged to reuse arrays to return collected data and do not create new array for every request.


bytesProvided

public int bytesProvided
In this field data collection method indicates how many bytes from collectedData array should be used by Collection Services.

If bytesProvided field is set to 0 or collectedData field is set to null after doBegin() or doEnd() methods, collection control record will not be created.
If bytesProvided field is set to 0 or collectedData field is set to null after doCollect() method, Collection Services will still create an interval record with no data stored.

If bytesProvided is larger than dataLimit, only first dataLimit bytes will be used. The rest will be ignored.

At entry to a method, this field is set to 0.

See DataCollectionProgram interface for the description of mentioned methods.


offset

public int offset
In this field data collection method indicates where Collection Services should start copying data from collectedData array.

If offset field value is larger than dimensions of collectedData array, all data will be ignored.

At entry to a method, this field is set to 0.


FORMAT_01

public static final java.lang.String FORMAT_01
This is a constant value for format field,

See format field for the description of the meaning of this constant.


CALL_NORMAL

public static final int CALL_NORMAL
This is a constant value for requestModifier field.

See requestModifier field for the description of the meaning of this constant.


CALL_CONTINUE

public static final int CALL_CONTINUE
This is a constant value for requestModifier field.

See requestModifier field for the description of the meaning of this constant.


MORE_DATA

public static final int MORE_DATA
This is a constant value for moreData field.

See moredata field for the description of the meaning of this constant.


NO_MORE_DATA

public static final int NO_MORE_DATA
This is a constant value for moreData field.

See moredata field for the description of the meaning of this constant.

Constructor Detail

DataCollectionRequest

public DataCollectionRequest()