可以透過該API管理QMGR MQAgent.java--- package cgw.mq.admin; import cgw.mq.bean.MQManageBean; import com.ibm.mq.MQEnvironment; import com.ibm.mq.MQException; import com.ibm.mq.pcf.PCFMessageAgent; public class MQAgent { private PCFMessageAgent agent; public MQAgent(MQManageBean bean ,int ccsid){ //MQEnvironment.CCSID = ccsid; try { PCFMessageAgent agent = new PCFMessageAgent(bean.getMqm_ip(),bean.getMqm_port(),bean.getAdmin_channel()); } catch (MQException e) { e.printStackTrace(); } agent.setCharacterSet(ccsid); } public PCFMessageAgent getAgent() { return agent; } public void close() throws MQException{ agent.disconnect(); } } MQManageBean.java--- package cgw.mq.bean; public class MQManageBean { private String mqm_ip; private int mqm_port; private String admin_channel; public String getAdmin_channel() { return admin_channel; } public void setAdmin_channel(String admin_channel) { this.admin_channel = admin_channel; } public String getMqm_ip() {
喜歡進化金融科技架構、也愛寫程式、更愛開放源碼、愛分享技術給大家的 Louis