本文整理汇总了Java中org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.getValidMethodsAsArray方法的典型用法代码示例。如果您正苦于以下问题:Java HTTPSamplerBase.getValidMethodsAsArray方法的具体用法?Java HTTPSamplerBase.getValidMethodsAsArray怎么用?Java HTTPSamplerBase.getValidMethodsAsArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase
的用法示例。
在下文中一共展示了HTTPSamplerBase.getValidMethodsAsArray方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getProtocolAndMethodPanel
import org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase; //导入方法依赖的package包/类
protected JPanel getProtocolAndMethodPanel() {
// Implementation
if (showImplementation) {
httpImplementation = new JLabeledChoice(JMeterUtils.getResString("http_implementation"), // $NON-NLS-1$
HTTPSamplerFactory.getImplementations());
httpImplementation.addValue("");
}
// PROTOCOL
protocol = new JTextField(4);
JLabel protocolLabel = new JLabel(JMeterUtils.getResString("protocol")); // $NON-NLS-1$
protocolLabel.setLabelFor(protocol);
// CONTENT_ENCODING
contentEncoding = new JTextField(10);
JLabel contentEncodingLabel = new JLabel(JMeterUtils.getResString("content_encoding")); // $NON-NLS-1$
contentEncodingLabel.setLabelFor(contentEncoding);
if (notConfigOnly){
method = new JLabeledChoice(JMeterUtils.getResString("method"), // $NON-NLS-1$
HTTPSamplerBase.getValidMethodsAsArray());
}
JPanel panel = new JPanel(new FlowLayout(FlowLayout.LEFT));
if (showImplementation) {
panel.add(httpImplementation);
}
panel.add(protocolLabel);
panel.add(protocol);
panel.add(Box.createHorizontalStrut(5));
if (notConfigOnly){
panel.add(method);
}
panel.setMinimumSize(panel.getPreferredSize());
panel.add(Box.createHorizontalStrut(5));
panel.add(contentEncodingLabel);
panel.add(contentEncoding);
panel.setMinimumSize(panel.getPreferredSize());
return panel;
}