The inventory collection sample implements an IBM Director inventory collector. It starts a collector session on a new thread, gathers data returned from a subagent, and places the values into a database. For a discussion of the rationale of inventory collection, see Creating an Inventory Collector.
The actual driving mechanism of the collector is called from the implementation of the abstract class, and resides in the BobCoSampleInventoryCollectorSession class. Not only does the session class drive the queries to the agent, it also populates the database.