当前位置: 首页>>代码示例>>Java>>正文


Java PCFMessageAgent类代码示例

本文整理汇总了Java中com.ibm.mq.pcf.PCFMessageAgent的典型用法代码示例。如果您正苦于以下问题:Java PCFMessageAgent类的具体用法?Java PCFMessageAgent怎么用?Java PCFMessageAgent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


PCFMessageAgent类属于com.ibm.mq.pcf包,在下文中一共展示了PCFMessageAgent类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createQueue

import com.ibm.mq.pcf.PCFMessageAgent; //导入依赖的package包/类
public void createQueue(String name) throws Exception {
	
	if ( usingJNDI ) {
		// Assumes use of ME01 SupportPac for WMQInitialContextFactory
		Queue queue = configureMQQueue( new MQQueue(name) );
		try {
			getInitialContext().bind( name, queue );
		} catch ( NameAlreadyBoundException e ) {
			// No op - already exists
		}
	} else {
           // "new" PCF style.
		PCFMessageAgent agent = new PCFMessageAgent( Config.parms.getString("jh"), Config.parms.getInt("jp"), "CLIENT" );
		PCFMessage message = new PCFMessage( CMQCFC.MQCMD_CREATE_Q );
		message.addParameter( CMQC.MQCA_Q_NAME, name);
		
		agent.send( message );
	}
	
}
 
开发者ID:ot4i,项目名称:perf-harness,代码行数:21,代码来源:WebSphereMQ.java

示例2: createPCFAgent

import com.ibm.mq.pcf.PCFMessageAgent; //导入依赖的package包/类
private void createPCFAgent(MQQueueManager qmgr) {

       try
       {
           if(debugMode)
               xw.println("Creating PCF Message Agent for queue manager '" + qmgrName + "'...");
           pcfAgent = new PCFMessageAgent(qmgr);
           if(debugMode)
               xw.println("PCF Message Agent reply queue name is '" + pcfAgent.getReplyQueueName() + "'...");
       }
       catch(PCFException pcfe)
       {
           System.err.println("PCF Message Agent creation ended with reason code " + pcfe.reasonCode + " (PCFExeption)");
           System.err.println(pcfe.getLocalizedMessage());
       }
       catch(MQException mqe)
       {
           System.err.println("PCF Message Agent creation ended with reason code " + mqe.reasonCode + " (MQException)");
           System.err.println(mqe.getLocalizedMessage());
       }
   }
 
开发者ID:ibm-messaging,项目名称:mq-event-display,代码行数:22,代码来源:Xmqdspev.java

示例3: deleteQueue

import com.ibm.mq.pcf.PCFMessageAgent; //导入依赖的package包/类
/**
  ** delete a queue on the provider. differs from deleting a jms queue.
  ** unbind the associated admin object from the jndi store. 
  */
 public void deleteQueue(String name) throws Exception {
     
     if ( usingJNDI ) {
         // Assumes use of ME01 SupportPac for WMQInitialContextFactory
     	System.setProperty( "MQJMS_PURGE_ON_DELETE", "yes" );
     	unbind( name );
     } else {
         
         // "new" PCF style.
PCFMessageAgent agent = new PCFMessageAgent( Config.parms.getString("jh"), Config.parms.getInt("jp"), "CLIENT" );
PCFMessage message = new PCFMessage( CMQCFC.MQCMD_DELETE_Q );
message.addParameter( CMQC.MQCA_Q_NAME, name);

message.addParameter( CMQCFC.MQIACF_PURGE, CMQCFC.MQPO_YES );

agent.send( message );
	
     }
 
 }
 
开发者ID:ot4i,项目名称:perf-harness,代码行数:25,代码来源:WebSphereMQ.java


注:本文中的com.ibm.mq.pcf.PCFMessageAgent类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。