Java Code Examples for org.apache.http.params.HttpParams#getParameter()

The following examples show how to use org.apache.http.params.HttpParams#getParameter() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestSocketFactory.java    From netcdf-java with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public Socket connectSocket(Socket socket, InetSocketAddress remote, InetSocketAddress local, HttpParams params)
    throws IOException {
  // See if our test parameter is present
  Object o = params.getParameter("testtesttest");
  assert (o != null);
  return super.connectSocket(socket, remote, local, params);
}
 
Example 2
Source File: TestSocketFactory.java    From netcdf-java with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
@Override
public Socket createSocket(HttpParams params) {
  // See if our test parameter is present
  Object o = params.getParameter("testtesttest");
  assert (o != null);
  return super.createSocket(params);
}
 
Example 3
Source File: SolrPortAwareCookieSpecFactory.java    From lucene-solr with Apache License 2.0 5 votes vote down vote up
@Override
public CookieSpec newInstance(final HttpParams params) {
  if (params != null) {
    String[] patterns = null;
    final Collection<?> param = (Collection<?>) params.getParameter(
        CookieSpecPNames.DATE_PATTERNS);
    if (param != null) {
      patterns = new String[param.size()];
      patterns = param.toArray(patterns);
    }
    return new PortAwareCookieSpec(patterns);
  } else {
    return new PortAwareCookieSpec(null);
  }
}