Tabnine Logo
HttpClientTransport.getProxyPort
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using org.apache.activemq.transport.http.HttpClientTransport.getProxyPort (Showing top 4 results out of 1,395)

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.httpHttpClientTransportgetProxyPort

Popular methods of HttpClientTransport

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

Popular in Java

  • Making http requests using okhttp
  • setContentView (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • findViewById (Activity)
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • Path (java.nio.file)
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • JComboBox (javax.swing)
  • CodeWhisperer alternatives
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