Package com.sun.jersey.client.urlconnection

Examples of com.sun.jersey.client.urlconnection.URLConnectionClientHandler


    super(TimelineClientImpl.class.getName());
    ClientConfig cc = new DefaultClientConfig();
    cc.getClasses().add(YarnJacksonJaxbJsonProvider.class);
    if (UserGroupInformation.isSecurityEnabled()) {
      urlFactory = new TimelineAuthenticatedURLConnectionFactory();
      client = new Client(new URLConnectionClientHandler(urlFactory), cc);
    } else {
      client = Client.create(cc);
    }
  }
View Full Code Here


     * utilizes {@link HttpURLConnection}.
     *
     * @return a default client handler.
     */
    private static ClientHandler createDefaultClientHander() {
        return new URLConnectionClientHandler();
    }
View Full Code Here

    public static Client getJerseyClient(Habitat habitat) {
        if (client == null) {
            // Tell Jersey to use HttpURLConnectionFactory that delegates to HttpConnectorAddress
            // URLConnection obtained form HttpConnectorAddress is set up for authentication required for secure admin communication
            HttpURLConnectionFactory urlConnectionFactory = new ConnectionFactory(habitat);
            client = new Client(new URLConnectionClientHandler(urlConnectionFactory));
        }

        return client;
    }
View Full Code Here

    public static Client getJerseyClient(Habitat habitat) {
        if (client == null) {
            // Tell Jersey to use HttpURLConnectionFactory that delegates to HttpConnectorAddress
            // URLConnection obtained form HttpConnectorAddress is set up for authentication required for secure admin communication
            HttpURLConnectionFactory urlConnectionFactory = new ConnectionFactory(habitat);
            client = new Client(new URLConnectionClientHandler(urlConnectionFactory));
        }

        return client;
    }
View Full Code Here

        clientConfig.getFeatures().put(JSONConfiguration.FEATURE_POJO_MAPPING, Boolean.TRUE);
        clientConfig.getClasses().add(JacksonObjectMapperProvider.class);

        if (StringUtils.isNotEmpty(proxyHost)) {
            Proxy proxy = new Proxy(Proxy.Type.HTTP, new InetSocketAddress(proxyHost, proxyPort == null ? 443 : proxyPort));
            return new Client(new URLConnectionClientHandler(new ProxyHandler(proxy)), clientConfig);
        }

        return Client.create(clientConfig);
    }
View Full Code Here

     * utilizes {@link HttpURLConnection}.
     *
     * @return a default client handler.
     */
    private static ClientHandler createDefaultClientHander() {
        return new URLConnectionClientHandler();
    }
View Full Code Here

     * utilizes {@link HttpURLConnection}.
     *
     * @return a default client handler.
     */
    private static ClientHandler createDefaultClientHander() {
        return new URLConnectionClientHandler();
    }
View Full Code Here

                // set proxy configuration
                HttpURLConnectionFactory factory = new ProxyURLConnectionFactory( config.getProxyUri(),
                                                                                  config.getProxyUser(),
                                                                                  config.getProxyPassword() );
                client = new Client( new URLConnectionClientHandler( factory ), clientConfig );
            } else {

                // this should pick up proxy config from system properties
                client = Client.create( clientConfig );
            }
View Full Code Here

                // set proxy configuration
                HttpURLConnectionFactory factory = new ProxyURLConnectionFactory( config.getProxyUri(),
                                                                                  config.getProxyUser(),
                                                                                  config.getProxyPassword() );
                client = new Client( new URLConnectionClientHandler( factory ), clientConfig );
            } else {

                // this should pick up proxy config from system properties
                client = Client.create( clientConfig );
            }
View Full Code Here

TOP

Related Classes of com.sun.jersey.client.urlconnection.URLConnectionClientHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.