當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。