org.apache.http.conn.scheme.SchemeSocketFactory Java Examples
The following examples show how to use
org.apache.http.conn.scheme.SchemeSocketFactory.
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: RestClient.java From s2g-zuul with MIT License | 6 votes |
public KeyStore getKeyStore(){ SchemeRegistry registry = httpClient4.getConnectionManager().getSchemeRegistry(); if(! registry.getSchemeNames().contains("https")){ throw new IllegalStateException("Registry does not include an 'https' entry."); } SchemeSocketFactory awareSocketFactory = httpClient4.getConnectionManager().getSchemeRegistry().getScheme("https").getSchemeSocketFactory(); if(awareSocketFactory instanceof KeyStoreAwareSocketFactory){ return ((KeyStoreAwareSocketFactory) awareSocketFactory).getKeyStore(); }else{ throw new IllegalStateException("Cannot extract keystore from scheme socket factory of type: " + awareSocketFactory.getClass().getName()); } }
Example #2
Source File: RestClient.java From ribbon with Apache License 2.0 | 6 votes |
public KeyStore getKeyStore(){ SchemeRegistry registry = httpClient4.getConnectionManager().getSchemeRegistry(); if(! registry.getSchemeNames().contains("https")){ throw new IllegalStateException("Registry does not include an 'https' entry."); } SchemeSocketFactory awareSocketFactory = httpClient4.getConnectionManager().getSchemeRegistry().getScheme("https").getSchemeSocketFactory(); if(awareSocketFactory instanceof KeyStoreAwareSocketFactory){ return ((KeyStoreAwareSocketFactory) awareSocketFactory).getKeyStore(); }else{ throw new IllegalStateException("Cannot extract keystore from scheme socket factory of type: " + awareSocketFactory.getClass().getName()); } }
Example #3
Source File: HttpTool.java From brooklyn-server with Apache License 2.0 | 4 votes |
public HttpClientBuilder socketFactory(SchemeSocketFactory val) { this.socketFactory = checkNotNull(val, "socketFactory"); return this; }