我有以下代码用于从MQ查询授权记录。
PCFMessageAgent agent = new PCFMessageAgent(queueManager);
agent.setCheckResponses(false);
PCFMessage[] responses;
PCFMessage request = new PCFMessage(MQConstants.MQCMD_INQUIRE_AUTH_RECS);
request.addParameter(MQConstants.MQIACF_AUTH_OPTIONS,
MQConstants.MQAUTHOPT_NAME_ALL_MATCHING + MQConstants.MQAUTHOPT_ENTITY_EXPLICIT + MQConstants.MQAUTHOPT_NAME_AS_WILDCARD);
request.addParameter(MQConstants.MQCACF_AUTH_PROFILE_NAME, "*");
request.addParameter(MQConstants.MQIACF_OBJECT_TYPE, MQConstants.MQOT_ALL);
responses = agent.send(request);
处理响应时,参数
1017
的值为MQIACF_OBJECT_TYPE
。文档仅显示
MQIACF_OBJECT_TYPE
的以下值MQOT_ALIAS_Q 1002
MQOT_ALL 1001
MQOT_AUTH_INFO 7
MQOT_CF_STRUC 10
MQOT_CHANNEL 6
MQOT_CLNTCONN_CHANNEL 1014
MQOT_CURRENT_CHANNEL 1011
MQOT_LOCAL_Q 1004
MQOT_MODEL_Q 1003
MQOT_NAMELIST 2
MQOT_PROCESS 3
MQOT_Q 1
MQOT_Q_MGR 5
MQOT_RECEIVER_CHANNEL 1010
MQOT_REMOTE_Q 1005
MQOT_REQUESTER_CHANNEL 1009
MQOT_RESERVED_1 999
MQOT_SAVED_CHANNEL 1012
MQOT_SENDER_CHANNEL 1007
MQOT_SERVER_CHANNEL 1008
MQOT_STORAGE_CLASS 4
MQOT_SVRCONN_CHANNEL 1013
为什么我得到一个值
1017
?这可以是其他各种值的组合吗?如果是,我怎么知道哪个?因为我可以通过上述值的几种组合得出数字
1017
。 最佳答案
根据https://www.ibm.com/support/knowledgecenter/SSFKSJ_9.0.0/com.ibm.mq.ref.dev.doc/q092140_.htm
1017是MQOT_REMOTE_Q_MGR_NAME
为了完整起见,这是来自9.0.0.0安装的MQOT_常量的列表
#define MQOT_NONE 0
#define MQOT_Q 1
#define MQOT_NAMELIST 2
#define MQOT_PROCESS 3
#define MQOT_STORAGE_CLASS 4
#define MQOT_Q_MGR 5
#define MQOT_CHANNEL 6
#define MQOT_AUTH_INFO 7
#define MQOT_TOPIC 8
#define MQOT_COMM_INFO 9
#define MQOT_CF_STRUC 10
#define MQOT_LISTENER 11
#define MQOT_SERVICE 12
#define MQOT_RESERVED_1 999
#define MQOT_ALL 1001
#define MQOT_ALIAS_Q 1002
#define MQOT_MODEL_Q 1003
#define MQOT_LOCAL_Q 1004
#define MQOT_REMOTE_Q 1005
#define MQOT_SENDER_CHANNEL 1007
#define MQOT_SERVER_CHANNEL 1008
#define MQOT_REQUESTER_CHANNEL 1009
#define MQOT_RECEIVER_CHANNEL 1010
#define MQOT_CURRENT_CHANNEL 1011
#define MQOT_SAVED_CHANNEL 1012
#define MQOT_SVRCONN_CHANNEL 1013
#define MQOT_CLNTCONN_CHANNEL 1014
#define MQOT_SHORT_CHANNEL 1015
#define MQOT_CHLAUTH 1016
#define MQOT_REMOTE_Q_MGR_NAME 1017
#define MQOT_PROT_POLICY 1019
#define MQOT_TT_CHANNEL 1020
#define MQOT_AMQP_CHANNEL 1021
#define MQOT_AUTH_REC 1022