congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
HttpClientTransport.getProxyPassword
Code IndexAdd Tabnine to your IDE (free)

How to use
getProxyPassword
method
in
org.apache.activemq.transport.http.HttpClientTransport

Best Java code snippets using org.apache.activemq.transport.http.HttpClientTransport.getProxyPassword (Showing top 4 results out of 315)

origin: org.apache.activemq/activemq-optional

protected HttpClient createHttpClient() {
  DefaultHttpClient client = new DefaultHttpClient(new PoolingClientConnectionManager());
  if (useCompression) {
    client.addRequestInterceptor( new HttpRequestInterceptor() {
      @Override
      public void process(HttpRequest request, HttpContext context) {
        // We expect to received a compression response that we un-gzip
        request.addHeader("Accept-Encoding", "gzip");
      }
    });
  }
  if (getProxyHost() != null) {
    HttpHost proxy = new HttpHost(getProxyHost(), getProxyPort());
    client.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
    if(getProxyUser() != null && getProxyPassword() != null) {
      client.getCredentialsProvider().setCredentials(
        new AuthScope(getProxyHost(), getProxyPort()),
        new UsernamePasswordCredentials(getProxyUser(), getProxyPassword()));
    }
  }
  return client;
}
origin: org.apache.activemq/activemq-all

protected HttpClient createHttpClient() {
  DefaultHttpClient client = new DefaultHttpClient(createClientConnectionManager());
  if (useCompression) {
    client.addRequestInterceptor( new HttpRequestInterceptor() {
      @Override
      public void process(HttpRequest request, HttpContext context) {
        // We expect to received a compression response that we un-gzip
        request.addHeader("Accept-Encoding", "gzip");
      }
    });
  }
  if (getProxyHost() != null) {
    HttpHost proxy = new HttpHost(getProxyHost(), getProxyPort());
    client.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
    if (client.getConnectionManager().getSchemeRegistry().get("http") == null) {
      client.getConnectionManager().getSchemeRegistry().register(
        new Scheme("http", getProxyPort(), PlainSocketFactory.getSocketFactory()));
    }
    if(getProxyUser() != null && getProxyPassword() != null) {
      client.getCredentialsProvider().setCredentials(
        new AuthScope(getProxyHost(), getProxyPort()),
        new UsernamePasswordCredentials(getProxyUser(), getProxyPassword()));
    }
  }
  HttpParams params = client.getParams();
  HttpConnectionParams.setSoTimeout(params, soTimeout);
  HttpClientParams.setCookiePolicy(params, CookiePolicy.BROWSER_COMPATIBILITY);
  return client;
}
origin: org.apache.activemq/activemq-osgi

protected HttpClient createHttpClient() {
  DefaultHttpClient client = new DefaultHttpClient(createClientConnectionManager());
  if (useCompression) {
    client.addRequestInterceptor( new HttpRequestInterceptor() {
      @Override
      public void process(HttpRequest request, HttpContext context) {
        // We expect to received a compression response that we un-gzip
        request.addHeader("Accept-Encoding", "gzip");
      }
    });
  }
  if (getProxyHost() != null) {
    HttpHost proxy = new HttpHost(getProxyHost(), getProxyPort());
    client.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
    if (client.getConnectionManager().getSchemeRegistry().get("http") == null) {
      client.getConnectionManager().getSchemeRegistry().register(
        new Scheme("http", getProxyPort(), PlainSocketFactory.getSocketFactory()));
    }
    if(getProxyUser() != null && getProxyPassword() != null) {
      client.getCredentialsProvider().setCredentials(
        new AuthScope(getProxyHost(), getProxyPort()),
        new UsernamePasswordCredentials(getProxyUser(), getProxyPassword()));
    }
  }
  HttpParams params = client.getParams();
  HttpConnectionParams.setSoTimeout(params, soTimeout);
  HttpClientParams.setCookiePolicy(params, CookiePolicy.BROWSER_COMPATIBILITY);
  return client;
}
origin: org.apache.activemq/activemq-http

protected HttpClient createHttpClient() {
  DefaultHttpClient client = new DefaultHttpClient(createClientConnectionManager());
  if (useCompression) {
    client.addRequestInterceptor( new HttpRequestInterceptor() {
      @Override
      public void process(HttpRequest request, HttpContext context) {
        // We expect to received a compression response that we un-gzip
        request.addHeader("Accept-Encoding", "gzip");
      }
    });
  }
  if (getProxyHost() != null) {
    HttpHost proxy = new HttpHost(getProxyHost(), getProxyPort());
    client.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy);
    if (client.getConnectionManager().getSchemeRegistry().get("http") == null) {
      client.getConnectionManager().getSchemeRegistry().register(
        new Scheme("http", getProxyPort(), PlainSocketFactory.getSocketFactory()));
    }
    if(getProxyUser() != null && getProxyPassword() != null) {
      client.getCredentialsProvider().setCredentials(
        new AuthScope(getProxyHost(), getProxyPort()),
        new UsernamePasswordCredentials(getProxyUser(), getProxyPassword()));
    }
  }
  HttpParams params = client.getParams();
  HttpConnectionParams.setSoTimeout(params, soTimeout);
  HttpClientParams.setCookiePolicy(params, CookiePolicy.BROWSER_COMPATIBILITY);
  return client;
}
org.apache.activemq.transport.httpHttpClientTransportgetProxyPassword

Popular methods of HttpClientTransport

  • <init>
  • configureMethod
  • createDataInputStream
  • createHttpClient
  • doConsume
  • getProxyHost
  • getProxyPort
  • getProxyUser
  • getReceiveHttpClient
  • getRemoteUrl
  • getSendHttpClient
  • getTextWireFormat
  • getSendHttpClient,
  • getTextWireFormat,
  • isStopped,
  • isStopping,
  • isTrace,
  • onException,
  • stop,
  • createClientConnectionManager

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (ScheduledExecutorService)
  • findViewById (Activity)
  • setScale (BigDecimal)
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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