Copyright © TIBCO Software Inc. All Rights Reserved

> tibemsCollection
> Type
> Purpose
> Represent a collection of administrative objects.
> Remarks
> Collections provide an array-like set of administrative objects for use by the calling program. Administrative objects include tibemsQueueInfo, tibemsTopicInfo, tibemsConsumerInfo, tibemsProducerInfo, and tibemsDetailedDestStat objects.

> | Collections are not thread-safe and should only be operated on by a single application thread.

> Function | Description | Page
> tibemsCollection_Destroy | Destroy a collection. | 437
> tibemsCollection_GetCount | Get the count of objects in a collection. | 438
> tibemsCollection_GetFirst | Get the first object in a collection. | 439
> tibemsCollection_GetNext | Get the next object in a collection. | 440

> See Also
> tibemsAdmin_GetQueues on page 429
> tibemsAdmin_GetTopics on page 432
> tibemsAdmin_GetConsumers on page 422
> tibemsAdmin_GetProducerStatistics on page 426
> tibemsConsumerInfo_GetDetailedStatistics on page 449
> tibemsProducerInfo_GetDetailedStatistics on page 471
> tibemsCollection_Destroy
> Function
> Purpose
> Destroy a collection.
> C Declaration
> tibems_status tibemsCollection_Destroy(
> tibemsCollection collection);
> COBOL Call
> CALL "tibemsCollection_Destroy"
> USING BY VALUE collection,
> RETURNING tibems-status
> END-CALL.

> | collection has usage pointer.

> Parameters

> Parameter | Description
> collection | The collection object to be destroyed.

> Remarks
> Collections are created internally by the EMS library. Use tibemsCollection_Destroy to remove collections of tibemsQueueInfo, tibemsTopicInfo, tibemsConsumerInfo, and tibemsProducerInfo objects. Collections of tibemsDetailedDestStat objects cannot be directly destroyed by the user application. Attempting to destroy a tibemsDetailedDestStat object returns TIBEMS_NOT_PERMITTED.
> Status Codes

> Status Code | Description
> TIBEMS_NOT_PERMITTED | The collection may not be directly destroyed by the application.

> tibemsCollection_GetCount
> Function
> Purpose
> Get the count of objects in a collection.
> C Declaration
> tibems_status tibemsCollection_GetCount(
> tibemsCollection collection,
> tibems_int* count);
> COBOL Call
> CALL "tibemsCollection_GetCount"
> USING BY VALUE collection,
> BY REFERENCE count,
> RETURNING tibems-status
> END-CALL.

> | collection has usage pointer.

> Parameters

> Parameter | Description
> collection | Get the number of objects in this collection.
> count | The function stores the count of objects in the collection in this location.

> tibemsCollection_GetFirst
> Function
> Purpose
> Get the first object in a collection.
> C Declaration
> tibems_status tibemsCollection_GetFirst(
> tibemsCollection collection,
> collectionObj* object);
> COBOL Call
> CALL "tibemsCollection_GetFirst"
> USING BY VALUE collection,
> BY REFERENCE obj,
> RETURNING tibems-status
> END-CALL.

> | collection has usage pointer.

> Parameters

> Parameter | Description
> collection | Get the first object in this collection.
> object | The function stores the first object in the collection in this location.

> Remarks
> This function must be called before any calls to tibemsCollection_GetNext.
> tibemsCollection_GetNext
> Function
> Purpose
> Get the next object in a collection.
> C Declaration
> tibems_status tibemsCollection_GetNext(
> tibemsCollection collection,
> collectionObj* object);
> COBOL Call
> CALL "tibemsCollection_GetNext"
> USING BY VALUE collection,
> BY REFERENCE obj,
> RETURNING tibems-status
> END-CALL.

> | collection has usage pointer.

> Parameters

> Parameter | Description
> collection | Get the next object in this collection.
> object | The function stores the next object in the collection in this location.

> Remarks
> This function gets the next object in a collection. If there are no more objects in the collection, tibemsCollection_GetNext returns TIBEMS_NOT_FOUND.
> The function tibemsCollection_GetFirst must be called before tibemsCollection_GetNext is called for the first time.
> Status Codes

> Status Code | Description
> TIBEMS_NOT_INITIALIZED | The collection has not been initialized with a call to tibemsCollection_GetFirst.
> TIBEMS_NOT_FOUND | There are no more objects in the collection.

Copyright © TIBCO Software Inc. All Rights Reserved