public class MQDistributionList extends MQManagedObject
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.alternateUserId, closeOptions, connectionReference, isOpen, name, openOptions| Constructor and Description |
|---|
MQDistributionList(MQQueueManager qMgr,
MQDistributionListItem[] litems,
int openOptions,
java.lang.String alternateUserId)
Creates a new distribution list and opens the queues.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the distribution list.
|
MQDistributionListItem |
getFirstDistributionListItem()
Gets the first item in the distribution list, or null if the list is empty.
|
int |
getInvalidDestinationCount()
Gets the number of items in the distribution list that failed to open successfully.
|
int |
getValidDestinationCount()
Gets the number of items in the distribution list that were opened successfully.
|
void |
put(MQMessage message,
MQPutMessageOptions putMessageOptions)
Puts a message to the queues on the distribution list.
|
getAlternateUserId, getAttributeString, getCloseOptions, getConnectionReference, getDescription, getName, getOpenOptions, getResolvedObjectString, getResolvedQName, getResolvedType, inquire, inquire, isOpen, set, setAttributeString, setCloseOptionspublic MQDistributionList(MQQueueManager qMgr, MQDistributionListItem[] litems, int openOptions, java.lang.String alternateUserId) throws MQException
qMgr - the queue manager where the list is to be opened.litems - the items to be included in the distribution list.openOptions - options which control the opening of the distribution list.alternateUserId - the alternative user identifier used to check the authorization for
opening queues if MQOO_ALTERNATE_USER_AUTHORITY is specified in openOptions. Otherwise
this parameter can be left blank (or null).MQException - is only thrown if the call fails completely. The constructor completes if
at least one queue opens succesfully.public void put(MQMessage message, MQPutMessageOptions putMessageOptions) throws MQException
message - the message descriptor information and the returned message data.putMessageOptions - controls the action of MQPUT.MQException - if the put fails.public void close()
throws MQException
close in class MQManagedObjectMQException - if the close fails.public int getValidDestinationCount()
public int getInvalidDestinationCount()
public MQDistributionListItem getFirstDistributionListItem()