MQDistributionList

public class MQDistributionList
extends MQManagedObject
java.lang.Object
   |
   +----com.ibm.mq.MQManagedObject
           |
           +----com.ibm.mq.MQDistributionList
          

Create a distribution list using the MQDistributionList() constructor or the MQQueueManager.accessDistributionList() method. A distribution list represents a set of open queues to which messages can be sent using a single call to the put method.

Constructors

MQDistributionList

public MQDistributionList(MQQueueManager qMgr, 
                          MQDistributionListItem[] litems, 
                          int openOptions, String alternateUserId) 
              throws MQException;

Creates a new distribution list and opens the queues.

Parameters
Exceptions

Methods

close

public void close() throws MQException;

Closes the distribution list.

Exceptions

getFirstDistributionListItem

public MQDistributionListItem getFirstDistributionListItem();

Gets the first item in the distribution list, or null if the list is empty.

Returns

getInvalidDestinationCount

public int getInvalidDestinationCount();

Gets the number of items in the distribution list that failed to open successfully.

Returns

getValidDestinationCount

public int getValidDestinationCount();

Gets the number of items in the distribution list that were opened successfully.

Returns

put

public void put(MQMessage message, MQPutMessageOptions putMessageOptions) 
              throws MQException;

Puts a message to the queues on the distribution list.

Parameters
Exceptions