/** * * @return the encoding of the content, i.e. its charset name */ public String getContentEncoding() { return getPropertyAsString(CONTENT_ENCODING); }
/** * Get the pool size for concurrent thread pool to get embedded resources. * * @return the pool size */ public String getConcurrentPool() { return getPropertyAsString(CONCURRENT_POOL, CONCURRENT_POOL_DEFAULT); }
public String getMethod() { return getPropertyAsString(METHOD); }
public String getDomain() { return getPropertyAsString(DOMAIN); }
public String getProxyPass() { return getPropertyAsString(PROXYPASS); }
/** * Get the regular expression URLs must match. * * @return regular expression (or empty) string */ public String getEmbeddedUrlRE() { return getPropertyAsString(EMBEDDED_URL_RE, ""); }
/** * get IP source to use - does not apply to Java HTTP implementation currently * * @return IP source to use */ public String getIpSource() { return getPropertyAsString(IP_SOURCE, ""); }
public String getProxyHost() { return getPropertyAsString(PROXYHOST); }
public String getProxyUser() { return getPropertyAsString(PROXYUSER); }
public String getImplementation() { return this.getPropertyAsString(IMPLEMENTATION); }
/** * Gets the protocol, with default. * * @return the protocol */ public String getProtocol() { String protocol = getPropertyAsString(PROTOCOL); if (protocol == null || protocol.length() == 0) { return DEFAULT_PROTOCOL; } return protocol; }
/** * Get the port number from the port string, allowing for trailing blanks. * * @return port number or UNSPECIFIED_PORT (== 0) */ public int getPortIfSpecified() { String portAsString = getPropertyAsString(PORT); if(portAsString == null || portAsString.isEmpty()) { return UNSPECIFIED_PORT; } try { return Integer.parseInt(portAsString.trim()); } catch (NumberFormatException e) { return UNSPECIFIED_PORT; } }
public String getPath() { String p = getPropertyAsString(PATH); return encodeSpaces(p); }
/** * {@inheritDoc} */ @Override public void configure(TestElement element) { super.configure(element); final HTTPSamplerBase samplerBase = (HTTPSamplerBase) element; urlConfigGui.configure(element); retrieveEmbeddedResources.setSelected(samplerBase.isImageParser()); concurrentDwn.setSelected(samplerBase.isConcurrentDwn()); concurrentPool.setText(samplerBase.getConcurrentPool()); useMD5.setSelected(samplerBase.useMD5()); embeddedRE.setText(samplerBase.getEmbeddedUrlRE()); if (!isAJP) { sourceIpAddr.setText(samplerBase.getIpSource()); sourceIpType.setSelectedIndex(samplerBase.getIpSourceType()); proxyHost.setText(samplerBase.getPropertyAsString(HTTPSamplerBase.PROXYHOST)); proxyPort.setText(samplerBase.getPropertyAsString(HTTPSamplerBase.PROXYPORT)); proxyUser.setText(samplerBase.getPropertyAsString(HTTPSamplerBase.PROXYUSER)); proxyPass.setText(samplerBase.getPropertyAsString(HTTPSamplerBase.PROXYPASS)); httpImplementation.setSelectedItem(samplerBase.getPropertyAsString(HTTPSamplerBase.IMPLEMENTATION)); connectTimeOut.setText(samplerBase.getPropertyAsString(HTTPSamplerBase.CONNECT_TIMEOUT)); responseTimeOut.setText(samplerBase.getPropertyAsString(HTTPSamplerBase.RESPONSE_TIMEOUT)); } }