本文整理汇总了Java中com.ibm.mq.pcf.PCFMessage类的典型用法代码示例。如果您正苦于以下问题:Java PCFMessage类的具体用法?Java PCFMessage怎么用?Java PCFMessage使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PCFMessage类属于com.ibm.mq.pcf包,在下文中一共展示了PCFMessage类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createQueue
import com.ibm.mq.pcf.PCFMessage; //导入依赖的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 );
}
}
示例2: deleteQueue
import com.ibm.mq.pcf.PCFMessage; //导入依赖的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 );
}
}
示例3: displayBridge_Started
import com.ibm.mq.pcf.PCFMessage; //导入依赖的package包/类
private String displayBridge_Started(PCFMessage pcfMsg)
throws PCFException {
int bridgeType = pcfMsg.getIntParameterValue(CMQCFC.MQIACF_BRIDGE_TYPE);
xw.println(" ReasonCode: " + pcfMsg.getReason());
xw.println(" EventName: Bridge Started - MQRC_BRIDGE_STARTED (2125, X'84D')");
xw.println(" EventType: IMS Bridge");
xw.println(" Description: The IMS bridge has been started.");
xw.println(" QMgrName: " + pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME));
xw.print(" BridgeType: " + bridgeType + " (");
switch (bridgeType) {
case CMQCFC.MQBT_OTMA:
xw.println("MQBT_OTMA)");
break;
default:
xw.println("Unknown!)");
} // end switch
xw.println(" BridgeName: " + pcfMsg.getStringParameterValue(CMQCFC.MQCACF_BRIDGE_NAME));
return rtrim(pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME)) + " - " + pcfMsg.getReason() + " - " + pcfReasonToString(pcfMsg.getReason()) + " ==> " + pcfMsg.getStringParameterValue(CMQCFC.MQCACF_BRIDGE_NAME);
}
示例4: displayChannel_Stopped_By_User
import com.ibm.mq.pcf.PCFMessage; //导入依赖的package包/类
private String displayChannel_Stopped_By_User(PCFMessage pcfMsg)
throws PCFException {
int reasonQualifier = pcfMsg.getIntParameterValue(CMQCFC.MQIACF_REASON_QUALIFIER);
xw.println(" ReasonCode: " + pcfMsg.getReason());
xw.println(" EventName: Channel Stopped By User - MQRC_CHANNEL_STOPPED_BY_USER (2279, X'8E7')");
xw.println(" EventType: Channel");
xw.println(" Description: This is issued when a user issues a STOP CHL command.");
xw.println(" ReasonQualifier identifies the reasons for stopping.");
xw.println(" QMgrName: " + pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME));
xw.print("ReasonQualifier: " + reasonQualifier + " (");
switch (reasonQualifier) {
case CMQCFC.MQRQ_CHANNEL_STOPPED_DISABLED:
xw.println("MQRQ_CHANNEL_STOPPED_DISABLED)");
break;
default:
xw.println("Unknown!)");
} // end switch
xw.println(" ChannelName: " + pcfMsg.getStringParameterValue(CMQCFC.MQCACH_CHANNEL_NAME));
return rtrim(pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME)) + " - " + pcfMsg.getReason() + " - " + pcfReasonToString(pcfMsg.getReason()) + " ==> " + pcfMsg.getStringParameterValue(CMQCFC.MQCACH_CHANNEL_NAME);
}
示例5: displayLogger_Status
import com.ibm.mq.pcf.PCFMessage; //导入依赖的package包/类
private String displayLogger_Status(PCFMessage pcfMsg)
throws PCFException {
xw.println(" ReasonCode: " + pcfMsg.getReason());
xw.println(" EventName: Logger Status - MQRC_LOGGER_STATUS (2411, X'96B')");
xw.println(" EventType: Logger");
xw.println(" Description: Issued when a queue manager starts writing to a new");
xw.println(" log extent or on i5/OS a new journal receiver.");
xw.println(" QMgrName: " + pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME));
xw.println(" CurrLogExtent: " + pcfMsg.getStringParameterValue(CMQCFC.MQCACF_CURRENT_LOG_EXTENT_NAME));
xw.println("ResRecLogExtent: " + pcfMsg.getStringParameterValue(CMQCFC.MQCACF_RESTART_LOG_EXTENT_NAME));
xw.println("MedRecLogExtent: " + pcfMsg.getStringParameterValue(CMQCFC.MQCACF_MEDIA_LOG_EXTENT_NAME));
xw.println(" LogPath: " + pcfMsg.getStringParameterValue(CMQCFC.MQCACF_LOG_PATH));
return rtrim(pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME)) + " - " + pcfMsg.getReason() + " - " + pcfReasonToString(pcfMsg.getReason());
}
示例6: displayQueue_Depth_High
import com.ibm.mq.pcf.PCFMessage; //导入依赖的package包/类
private String displayQueue_Depth_High(PCFMessage pcfMsg)
throws PCFException {
xw.println(" ReasonCode: " + pcfMsg.getReason());
xw.println(" EventName: Queue Depth High - MQRC_Q_DEPTH_HIGH (2224, X'8B0')");
xw.println(" EventType: Performance");
xw.println(" Description: An MQPUT or MQPUT1 call has caused the queue depth to");
xw.println(" be incremented to or above the limit specified in the");
xw.println(" QDepthHighLimit attribute.");
xw.println(" QMgrName: " + pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME));
xw.println(" QName: " + pcfMsg.getStringParameterValue(CMQC.MQCA_BASE_Q_NAME));
xw.println(" TimeSinceReset: " + pcfMsg.getIntParameterValue(CMQC.MQIA_TIME_SINCE_RESET));
xw.println(" HighQDepth: " + pcfMsg.getIntParameterValue(CMQC.MQIA_HIGH_Q_DEPTH));
xw.println(" MsgEnqCount: " + pcfMsg.getIntParameterValue(CMQC.MQIA_MSG_ENQ_COUNT));
xw.println(" MsgDeqCount: " + pcfMsg.getIntParameterValue(CMQC.MQIA_MSG_DEQ_COUNT));
return rtrim(pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME)) + " - " + pcfMsg.getReason() + " - " + pcfReasonToString(pcfMsg.getReason()) + " ==> " + pcfMsg.getStringParameterValue(CMQC.MQCA_BASE_Q_NAME);
}
示例7: displayQueue_Depth_Low
import com.ibm.mq.pcf.PCFMessage; //导入依赖的package包/类
private String displayQueue_Depth_Low(PCFMessage pcfMsg)
throws PCFException {
xw.println(" ReasonCode: " + pcfMsg.getReason());
xw.println(" EventName: Queue Depth Low - MQRC_Q_DEPTH_LOW (2225, X'8B1')");
xw.println(" EventType: Performance");
xw.println(" Description: A get operation has caused the queue depth to be");
xw.println(" decremented to or below the limit specified in the");
xw.println(" QDepthLowLimit attribute.");
xw.println(" QMgrName: " + pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME));
xw.println(" QName: " + pcfMsg.getStringParameterValue(CMQC.MQCA_BASE_Q_NAME));
xw.println(" TimeSinceReset: " + pcfMsg.getIntParameterValue(CMQC.MQIA_TIME_SINCE_RESET));
xw.println(" HighQDepth: " + pcfMsg.getIntParameterValue(CMQC.MQIA_HIGH_Q_DEPTH));
xw.println(" MsgEnqCount: " + pcfMsg.getIntParameterValue(CMQC.MQIA_MSG_ENQ_COUNT));
xw.println(" MsgDeqCount: " + pcfMsg.getIntParameterValue(CMQC.MQIA_MSG_DEQ_COUNT));
return rtrim(pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME)) + " - " + pcfMsg.getReason() + " - " + pcfReasonToString(pcfMsg.getReason()) + " ==> " + pcfMsg.getStringParameterValue(CMQC.MQCA_BASE_Q_NAME);
}
示例8: displayQueue_Full
import com.ibm.mq.pcf.PCFMessage; //导入依赖的package包/类
private String displayQueue_Full(PCFMessage pcfMsg)
throws PCFException {
xw.println(" ReasonCode: " + pcfMsg.getReason());
xw.println(" EventName: Queue Full - MQRC_Q_FULL (2053, X'805')");
xw.println(" EventType: Performance");
xw.println(" Description: On an MQPUT or MQPUT1 call, the call failed because");
xw.println(" the queue is full. That is, it already contains the");
xw.println(" maximum number of messages possible (see the MaxQDepth");
xw.println(" local-queue attribute).");
xw.println(" QMgrName: " + pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME));
xw.println(" QName: " + pcfMsg.getStringParameterValue(CMQC.MQCA_BASE_Q_NAME));
xw.println(" TimeSinceReset: " + pcfMsg.getIntParameterValue(CMQC.MQIA_TIME_SINCE_RESET));
xw.println(" HighQDepth: " + pcfMsg.getIntParameterValue(CMQC.MQIA_HIGH_Q_DEPTH));
xw.println(" MsgEnqCount: " + pcfMsg.getIntParameterValue(CMQC.MQIA_MSG_ENQ_COUNT));
xw.println(" MsgDeqCount: " + pcfMsg.getIntParameterValue(CMQC.MQIA_MSG_DEQ_COUNT));
return rtrim(pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME)) + " - " + pcfMsg.getReason() + " - " + pcfReasonToString(pcfMsg.getReason()) + " ==> " + pcfMsg.getStringParameterValue(CMQC.MQCA_BASE_Q_NAME);
}
示例9: displayQueue_Manager_Not_Active
import com.ibm.mq.pcf.PCFMessage; //导入依赖的package包/类
private String displayQueue_Manager_Not_Active(PCFMessage pcfMsg)
throws PCFException {
int reasonQualifier = pcfMsg.getIntParameterValue(CMQCFC.MQIACF_REASON_QUALIFIER);
xw.println(" ReasonCode: " + pcfMsg.getReason());
xw.println(" EventName: Queue Manager Not Active - MQRC_Q_MGR_NOT_ACTIVE (2223, X'8AF')");
xw.println(" EventType: Start and Stop");
xw.println(" Description: This condition is detected when a queue manager is requested");
xw.println(" to stop or quiesce.");
xw.println(" QMgrName: " + pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME));
xw.print("ReasonQualifier: " + reasonQualifier + " (");
switch (reasonQualifier) {
case CMQCFC.MQRQ_Q_MGR_STOPPING:
xw.println("MQRQ_Q_MGR_STOPPING)");
break;
case CMQCFC.MQRQ_Q_MGR_QUIESCING:
xw.println("MQRQ_Q_MGR_QUIESCING)");
break;
default:
xw.println("Unknown!)");
} // end switch
return rtrim(pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME)) + " - " + pcfMsg.getReason() + " - " + pcfReasonToString(pcfMsg.getReason());
}
示例10: displayQueue_Service_Interval_High
import com.ibm.mq.pcf.PCFMessage; //导入依赖的package包/类
private String displayQueue_Service_Interval_High(PCFMessage pcfMsg)
throws PCFException {
xw.println(" ReasonCode: " + pcfMsg.getReason());
xw.println(" EventName: Queue Service Interval High - MQRC_Q_SERVICE_INTERVAL_HIGH (2226, X'8B2')");
xw.println(" EventType: Performance");
xw.println(" Description: No successful get operations or MQPUT calls have been detected");
xw.println(" within an interval greater than the limit specified in the");
xw.println(" QServiceInterval attribute.");
xw.println(" QMgrName: " + pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME));
xw.println(" QName: " + pcfMsg.getStringParameterValue(CMQC.MQCA_BASE_Q_NAME));
xw.println(" TimeSinceReset: " + pcfMsg.getIntParameterValue(CMQC.MQIA_TIME_SINCE_RESET));
xw.println(" HighQDepth: " + pcfMsg.getIntParameterValue(CMQC.MQIA_HIGH_Q_DEPTH));
xw.println(" MsgEnqCount: " + pcfMsg.getIntParameterValue(CMQC.MQIA_MSG_ENQ_COUNT));
xw.println(" MsgDeqCount: " + pcfMsg.getIntParameterValue(CMQC.MQIA_MSG_DEQ_COUNT));
return rtrim(pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME)) + " - " + pcfMsg.getReason() + " - " + pcfReasonToString(pcfMsg.getReason()) + " ==> " + pcfMsg.getStringParameterValue(CMQC.MQCA_BASE_Q_NAME);
}
示例11: displayQueue_Service_Interval_OK
import com.ibm.mq.pcf.PCFMessage; //导入依赖的package包/类
private String displayQueue_Service_Interval_OK(PCFMessage pcfMsg)
throws PCFException {
xw.println(" ReasonCode: " + pcfMsg.getReason());
xw.println(" EventName: Queue Service Interval OK - MQRC_Q_SERVICE_INTERVAL_OK (2227, X'8B3')");
xw.println(" EventType: Performance");
xw.println(" Description: A successful get operation has been detected within an");
xw.println(" interval less than or equal to the limit specified in the");
xw.println(" QServiceInterval attribute.");
xw.println(" QMgrName: " + pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME));
xw.println(" QName: " + pcfMsg.getStringParameterValue(CMQC.MQCA_BASE_Q_NAME));
xw.println(" TimeSinceReset: " + pcfMsg.getIntParameterValue(CMQC.MQIA_TIME_SINCE_RESET));
xw.println(" HighQDepth: " + pcfMsg.getIntParameterValue(CMQC.MQIA_HIGH_Q_DEPTH));
xw.println(" MsgEnqCount: " + pcfMsg.getIntParameterValue(CMQC.MQIA_MSG_ENQ_COUNT));
xw.println(" MsgDeqCount: " + pcfMsg.getIntParameterValue(CMQC.MQIA_MSG_DEQ_COUNT));
return rtrim(pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME)) + " - " + pcfMsg.getReason() + " - " + pcfReasonToString(pcfMsg.getReason()) + " ==> " + pcfMsg.getStringParameterValue(CMQC.MQCA_BASE_Q_NAME);
}
示例12: displayBridge_Stopped
import com.ibm.mq.pcf.PCFMessage; //导入依赖的package包/类
private String displayBridge_Stopped(PCFMessage pcfMsg)
throws PCFException {
int reasonQualifier = pcfMsg.getIntParameterValue(CMQCFC.MQIACF_REASON_QUALIFIER);
int bridgeType = pcfMsg.getIntParameterValue(CMQCFC.MQIACF_BRIDGE_TYPE);
xw.println(" ReasonCode: " + pcfMsg.getReason());
xw.println(" EventName: Bridge Stopped - MQRC_BRIDGE_STOPPED (2126, X'84E')");
xw.println(" EventType: IMS Bridge");
xw.println(" Description: The IMS bridge has been stopped.");
xw.println(" QMgrName: " + pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME));
xw.print("ReasonQualifier: " + reasonQualifier + " (");
switch (reasonQualifier) {
case CMQCFC.MQRQ_BRIDGE_STOPPED_OK:
xw.println("MQRQ_BRIDGE_STOPPED_OK)");
break;
case CMQCFC.MQRQ_BRIDGE_STOPPED_ERROR:
xw.println("MQRQ_BRIDGE_STOPPED_ERROR)");
break;
default:
xw.println("Unknown!)");
} // end switch
xw.print(" BridgeType: " + bridgeType + " (");
switch (bridgeType) {
case CMQCFC.MQBT_OTMA:
xw.println("MQBT_OTMA)");
break;
default:
xw.println("Unknown!)");
} // end switch
xw.println(" BridgeName: " + pcfMsg.getStringParameterValue(CMQCFC.MQCACF_BRIDGE_NAME));
if (reasonQualifier == CMQCFC.MQRQ_BRIDGE_STOPPED_ERROR) xw.println("ErrorIdentifier: " + pcfMsg.getIntParameterValue(CMQCFC.MQIACF_ERROR_IDENTIFIER));
return rtrim(pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME)) + " - " + pcfMsg.getReason() + " - " + pcfReasonToString(pcfMsg.getReason()) + " ==> " + pcfMsg.getStringParameterValue(CMQCFC.MQCACF_BRIDGE_NAME);
}
示例13: displayChannel_Auto_Definition_Error
import com.ibm.mq.pcf.PCFMessage; //导入依赖的package包/类
private String displayChannel_Auto_Definition_Error(PCFMessage pcfMsg)
throws PCFException {
int channelType = pcfMsg.getIntParameterValue(CMQCFC.MQIACH_CHANNEL_TYPE);
xw.println(" ReasonCode: " + pcfMsg.getReason());
xw.println(" EventName: Channel Auto-Definition Error - MQRC_CHANNEL_AUTO_DEF_ERROR (2234, X'8BA')");
xw.println(" EventType: Channel");
xw.println(" Description: This condition is detected when the automatic definition of a channel");
xw.println(" fails; this may be because an error occurred during the definition");
xw.println(" process, or because the channel automatic-definition exit inhibited");
xw.println(" the definition. Additional information indicating the reason for the");
xw.println(" failure is returned in the event message.");
xw.println(" QMgrName: " + pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME));
xw.println(" ChannelName: " + pcfMsg.getStringParameterValue(CMQCFC.MQCACH_CHANNEL_NAME));
xw.print(" ChannelType: " + channelType + " (");
switch (channelType) {
case CMQXC.MQCHT_RECEIVER:
xw.println("MQCHT_RECEIVER)");
break;
case CMQXC.MQCHT_SVRCONN:
xw.println("MQCHT_SVRCONN)");
break;
case CMQXC.MQCHT_CLUSSDR:
xw.println("MQCHT_CLUSSDR)");
break;
default:
xw.println("Unknown!)");
} // end switch
xw.println("ErrorIdentifier: " + pcfMsg.getIntParameterValue(CMQCFC.MQIACF_ERROR_IDENTIFIER));
xw.println(" ConnectionName: " + pcfMsg.getStringParameterValue(CMQCFC.MQCACH_CONNECTION_NAME));
try {
xw.println(" AuxErrDataInt1: " + pcfMsg.getIntParameterValue(CMQCFC.MQIACF_AUX_ERROR_DATA_INT_1));
} catch (MQException mqe) {;}
return rtrim(pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME)) + " - " + pcfMsg.getReason() + " - " + pcfReasonToString(pcfMsg.getReason()) + " ==> " + pcfMsg.getStringParameterValue(CMQCFC.MQCACH_CHANNEL_NAME);
}
示例14: displayChannel_Auto_Definition_OK
import com.ibm.mq.pcf.PCFMessage; //导入依赖的package包/类
private String displayChannel_Auto_Definition_OK(PCFMessage pcfMsg)
throws PCFException {
int channelType = pcfMsg.getIntParameterValue(CMQCFC.MQIACH_CHANNEL_TYPE);
xw.println(" ReasonCode: " + pcfMsg.getReason());
xw.println(" EventName: Channel Auto-Definition OK - MQRC_CHANNEL_AUTO_DEF_OK (2233, X'8B9')");
xw.println(" EventType: Channel");
xw.println(" Description: This condition is detected when the automatic definition of");
xw.println(" a channel is successful. The channel is defined by the MCA.");
xw.println(" QMgrName: " + pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME));
xw.println(" ChannelName: " + pcfMsg.getStringParameterValue(CMQCFC.MQCACH_CHANNEL_NAME));
xw.print(" ChannelType: " + channelType + " (");
switch (channelType) {
case CMQXC.MQCHT_RECEIVER:
xw.println("MQCHT_RECEIVER)");
break;
case CMQXC.MQCHT_SVRCONN:
xw.println("MQCHT_SVRCONN)");
break;
case CMQXC.MQCHT_CLUSSDR:
xw.println("MQCHT_CLUSSDR)");
break;
default:
xw.println("Unknown!)");
} // end switch
xw.println(" ConnectionName: " + pcfMsg.getStringParameterValue(CMQCFC.MQCACH_CONNECTION_NAME));
return rtrim(pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME)) + " - " + pcfMsg.getReason() + " - " + pcfReasonToString(pcfMsg.getReason()) + " ==> " + pcfMsg.getStringParameterValue(CMQCFC.MQCACH_CHANNEL_NAME);
}
示例15: displayQueue_Manager_Active
import com.ibm.mq.pcf.PCFMessage; //导入依赖的package包/类
private String displayQueue_Manager_Active(PCFMessage pcfMsg)
throws PCFException {
xw.println(" ReasonCode: " + pcfMsg.getReason());
xw.println(" EventName: Queue Manager Active - MQRC_Q_MGR_ACTIVE (2222, X'8AE')");
xw.println(" EventType: Start and Stop");
xw.println(" Description: This condition is detected when a queue manager becomes");
xw.println(" active.");
xw.println(" QMgrName: " + pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME));
return rtrim(pcfMsg.getStringParameterValue(CMQC.MQCA_Q_MGR_NAME)) + " - " + pcfMsg.getReason() + " - " + pcfReasonToString(pcfMsg.getReason());
}