Tabnine Logo
org.apache.commons.httpclient.params
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.commons.httpclient.params

Best Java code snippets using org.apache.commons.httpclient.params (Showing top 20 results out of 1,647)

origin: commons-httpclient/commons-httpclient

  public void makeLenient() {
    super.makeLenient();
    setParameters(PROTOCOL_STRICTNESS_PARAMETERS, Boolean.FALSE);
  }
}
origin: commons-httpclient/commons-httpclient

public void makeStrict() {
  super.makeStrict();
  setParameters(PROTOCOL_STRICTNESS_PARAMETERS, Boolean.TRUE);
}
origin: commons-httpclient/commons-httpclient

/**
 * Returns the default 
 * {@link org.apache.commons.httpclient.HttpConnectionManager HTTP connection manager}
 * class.
 * @return {@link org.apache.commons.httpclient.HttpConnectionManager HTTP connection manager}
 * factory class.
 */ 
public Class getConnectionManagerClass() {
  return (Class) getParameter(CONNECTION_MANAGER_CLASS);
}
origin: commons-httpclient/commons-httpclient

/**
 * Sets {@link org.apache.commons.httpclient.HttpConnectionManager HTTP connection manager}
 * class to be used der default.
 * @param clazz 
 *  {@link org.apache.commons.httpclient.HttpConnectionManager HTTP connection manager}
 *  factory class.
 */ 
public void setConnectionManagerClass(Class clazz) {
  setParameter(CONNECTION_MANAGER_CLASS, clazz);
}

origin: commons-httpclient/commons-httpclient

/**
 * Sets the default charset to be used for writing content body,
 * when no charset explicitly specified.
 * @param charset The charset
 */
public void setContentCharset(String charset) {
  setParameter(HTTP_CONTENT_CHARSET, charset);
}
origin: commons-httpclient/commons-httpclient

/**
 * Sets the maximum number of connections allowed for this connection manager.
 *
 * @param maxTotalConnections the maximum number of connections allowed
 * 
 * @deprecated Use {@link HttpConnectionManagerParams#setMaxTotalConnections(int)},
 * {@link HttpConnectionManager#getParams()}.
 */
public void setMaxTotalConnections(int maxTotalConnections) {
  this.params.setMaxTotalConnections(maxTotalConnections);
}
origin: commons-httpclient/commons-httpclient

/**
 * Sets whether authentication should be attempted preemptively.
 * 
 * @param value <tt>true</tt> if authentication should be attempted preemptively,
 *   <tt>false</tt> otherwise.
 */
public void setAuthenticationPreemptive(boolean value) {
  setBooleanParameter(PREEMPTIVE_AUTHENTICATION, value); 
}
origin: commons-httpclient/commons-httpclient

/**
 * Returns the virtual host name.
 * 
 * @return The virtual host name
 */
public String getVirtualHost() {
  return (String) getParameter(HttpMethodParams.VIRTUAL_HOST);
}
  
origin: commons-httpclient/commons-httpclient

/**
 * Returns a hint the size of the underlying buffers used by the platform 
 * for incoming network I/O. This value is a suggestion to the kernel from 
 * the application about the size of buffers to use for the data to be received 
 * over the socket.  
 *
 * @return the hint size of the send buffer
 */
public int getReceiveBufferSize() {
  return getIntParameter(SO_RCVBUF, -1);
}
origin: commons-httpclient/commons-httpclient

/**
 * Sets the maximum number of connections allowed.
 *
 * @param maxTotalConnections The maximum number of connections allowed.
 * 
 * @see #MAX_TOTAL_CONNECTIONS
 */
public void setMaxTotalConnections(int maxTotalConnections) {
  setIntParameter(
    HttpConnectionManagerParams.MAX_TOTAL_CONNECTIONS,
    maxTotalConnections);
}
origin: commons-httpclient/commons-httpclient

/**
 * Creates a new collection of parameters with the collection returned
 * by {@link #getDefaultParams()} as a parent. The collection will defer
 * to its parent for a default value if a particular parameter is not 
 * explicitly set in the collection itself.
 * 
 * @see #getDefaultParams()
 */
public HttpMethodParams() {
  super(getDefaultParams());
}
origin: commons-httpclient/commons-httpclient

/**
 * Returns the timeout in milliseconds used when retrieving an 
 * {@link org.apache.commons.httpclient.HttpConnection HTTP connection} from the
 * {@link org.apache.commons.httpclient.HttpConnectionManager HTTP connection manager}.
 * 
 * @return timeout in milliseconds.
 */ 
public long getConnectionManagerTimeout() {
  return getLongParameter(CONNECTION_MANAGER_TIMEOUT, 0);
}
origin: commons-httpclient/commons-httpclient

/**
 * Returns <tt>true</tt> if authentication should be attempted preemptively, 
 * <tt>false</tt> otherwise.
 * 
 * @return <tt>true</tt> if authentication should be attempted preemptively,
 *   <tt>false</tt> otherwise.
 */
public boolean isAuthenticationPreemptive() {
  return getBooleanParameter(PREEMPTIVE_AUTHENTICATION, false); 
}
origin: commons-httpclient/commons-httpclient

/**
 * Sets the default socket timeout (<tt>SO_TIMEOUT</tt>) in milliseconds which is the 
 * timeout for waiting for data. A timeout value of zero is interpreted as an infinite 
 * timeout. This value is used when no socket timeout is set in the 
 * {@link HttpMethodParams HTTP method parameters}. 
 *
 * @param timeout Timeout in milliseconds
 */
public void setSoTimeout(int timeout) {
  setIntParameter(SO_TIMEOUT, timeout);
}
origin: commons-httpclient/commons-httpclient

/**
 * Tests whether stale connection check is to be used. Disabling 
 * stale connection check may result in slight performance improvement 
 * at the risk of getting an I/O error when executing a request over a
 * connection that has been closed at the server side. 
 * 
 * @return <tt>true</tt> if stale connection check is to be used, 
 *   <tt>false</tt> otherwise.
 */
public boolean isStaleCheckingEnabled() {
  return getBooleanParameter(STALE_CONNECTION_CHECK, true);
}
origin: commons-httpclient/commons-httpclient

/**
 * Gets the default HttpParams to be used.
 * 
 * @return the value returned from <code>HttpParamsFactory#getDefaultParams()</code>
 * 
 * @see HttpParamsFactory#getDefaultParams()
 */
public static HttpParams getDefaultParams() {
  return httpParamsFactory.getDefaultParams();
}

origin: commons-httpclient/commons-httpclient

public synchronized HttpParams getDefaultParams() {
  if (httpParams == null) {
    httpParams = createParams();
  }
  return httpParams;
}
origin: commons-httpclient/commons-httpclient

/**
 * Assigns the {@link CookiePolicy cookie policy} to be used by the 
 * {@link org.apache.commons.httpclient.HttpMethod HTTP methods} 
 * this collection of parameters applies to. 
 *
 * @param policy the {@link CookiePolicy cookie policy}
 */
public void setCookiePolicy(String policy) {
  setParameter(COOKIE_POLICY, policy);
}
origin: commons-httpclient/commons-httpclient

/**
 * Returns linger-on-close timeout. Value <tt>0</tt> implies that the option is 
 * disabled. Value <tt>-1</tt> implies that the JRE default is used.
 * 
 * @return the linger-on-close timeout
 */
public int getLinger() {
  return getIntParameter(SO_LINGER, -1);
}
origin: commons-httpclient/commons-httpclient

/**
 * Returns a hint the size of the underlying buffers used by the platform for 
 * outgoing network I/O. This value is a suggestion to the kernel from the 
 * application about the size of buffers to use for the data to be sent over 
 * the socket.
 *
 * @return the hint size of the send buffer
 */
public int getSendBufferSize() {
  return getIntParameter(SO_SNDBUF, -1);
}
org.apache.commons.httpclient.params

Most used classes

  • HttpClientParams
    This class represents a collection of HTTP protocol parameters applicable to org.apache.commons.http
  • HttpConnectionManagerParams
    This class represents a collection of HTTP protocol parameters applicable to org.apache.commons.http
  • HttpMethodParams
    This class represents a collection of HTTP protocol parameters applicable to org.apache.commons.http
  • HttpConnectionParams
    This class represents a collection of HTTP protocol parameters applicable to org.apache.commons.http
  • HostParams
    This class represents a collection of HTTP protocol parameters applicable to org.apache.commons.http
  • DefaultHttpParams,
  • DefaultHttpParamsFactory,
  • HttpParamsFactory
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now