com.ibm.iseries.collectionservices
Interface DataCollectionProgram


public interface DataCollectionProgram

This interface defines methods which Java data collection program must implement to interface to Collection Services support for user-defined categories.

Java class, which implements this interface, must provide a no-arg constructor. This constructor will be called to create an object of the class. All further interaction between data collection program and Collection Servics will be via this object.

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

Information, common for all methods:

Since:
V5R2M0

Method Summary
 int doBegin(DataCollectionRequest req)
          Start Collection request.
 int doCollect(DataCollectionRequest req)
          Interval Collection request.
 int doEnd(DataCollectionRequest req)
          End Collection request.
 int doShutdown(DataCollectionRequest req)
          Cleanup and Terminate (Shutdown) request.
 

Method Detail

doBegin

public int doBegin(DataCollectionRequest req)
Start Collection request.
This is the first request data collection program will receive in a data collection session. When receiving this request, data collection program is expected to initialize whatever interfaces it uses to collect the data. It is also used to initialize an object of a class.

Optionally, this method can return collection control information to be stored in a collection control record in a repository of a Management Collection Object.

See class preface for explanation of method parameter and return value.


doEnd

public int doEnd(DataCollectionRequest req)
End Collection request.
This is the last request data collection program will receive in a data collection session. When receiving this request, data collection program is expected to close whatever interfaces it uses to collect the data, release resources etc.

Optionally, this method can return collection control information to be stored in a collection control record in a repository of a Management Collection Object.

See class preface for explanation of method parameter and return value.


doCollect

public int doCollect(DataCollectionRequest req)
Interval Collection request.
Data collection program will receive request of this type each time interval collection for this user-defined category is scheduled. Time between interval collection requests (collection interval) is specified in Collection Services collector configuration.
When receiving this request, data collection program is expected to perform its regular collection of performance data and return collected data. The returned data will be stored in an interval record in a repository of a Management Collection Object.

See class preface for explanation of method parameter and return value.


doShutdown

public int doShutdown(DataCollectionRequest req)
Cleanup and Terminate (Shutdown) request.
Data collection program will receive request of this type when Collection Services cannot continue data collection. An example of such problem is a loss of contact with a Collection Services collector job.
When receiving this request, data collection program is expected to perform necessary cleanup, release resources etc. Any data returned by this method will be ignored.

See class preface for explanation of method parameter and return value.