Spring Framework SimpleClientHttpRequestFactory - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework SimpleClientHttpRequestFactory class.

This code example shows how to use the following methods:
	/** 
	 * Logger available to subclasses. 
	 */ 
	protected final Log logger = LogFactory.getLog(getClass());
 
	private ClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();
 
 
	/** 
	 * Set the request factory that this accessor uses for obtaining {@link ClientHttpRequest HttpRequests}. 
	 */ 
	public void setRequestFactory(ClientHttpRequestFactory requestFactory) {
		Assert.notNull(requestFactory, "'requestFactory' must not be null");
		this.requestFactory = requestFactory;
	} 
 
	/** 
	 * Return the request factory that this accessor uses for obtaining {@link ClientHttpRequest HttpRequests}. 
	 */ 
	public ClientHttpRequestFactory getRequestFactory() {
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 
  private final ProtectedResourceDetails resource;
  private OAuthConsumerSupport support = new CoreOAuthConsumerSupport();
 
  public OAuthRestTemplate(ProtectedResourceDetails resource) {
    this(new SimpleClientHttpRequestFactory(), resource);
  } 
 
  public OAuthRestTemplate(ClientHttpRequestFactory requestFactory, ProtectedResourceDetails resource) {
    super(); 
    if (resource == null) {
      throw new IllegalArgumentException("An OAuth resource must be supplied.");
    } 
    if (support == null) {
      throw new IllegalArgumentException("OAuth support must be supplied.");
    } 
 
    this.resource = resource;
    setRequestFactory(requestFactory);
  } 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 */ 
public class RestTemplateIntegrationSimpleClientTests extends AbstractRestTemplateIntegrationTests { 
	 
	@Override 
	protected RestTemplate getRestTemplate() { 
		return new RestTemplate(new SimpleClientHttpRequestFactory()); 
	} 
 
} 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:setConnectTimeout, setReadTimeout
 
	private RestTemplate restTemplate;
 
	@Before 
	public void setUpRestTemplate() throws Exception {
		SimpleClientHttpRequestFactory simpleClientHttpRequestFactory = new SimpleClientHttpRequestFactory();
		// set this value as low as possible, since we're connecting locally 
		simpleClientHttpRequestFactory.setConnectTimeout(500);
		simpleClientHttpRequestFactory.setReadTimeout(2000);
		restTemplate = new RestTemplate(simpleClientHttpRequestFactory);
	} 
 
	@Test
	public void testModuleEndpointIsNotSecuredByDefault() throws Exception {
		springXdResource.getMockMvc()
				.perform(get("/modules"))
				.andExpect(status().isOk());
	} 
 
	@Test
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
public class ClientHttpRequestMessageSender extends AbstractHttpWebServiceMessageSender { 
 
	private ClientHttpRequestFactory requestFactory;
 
	public ClientHttpRequestMessageSender() { 
		this(new SimpleClientHttpRequestFactory());
	} 
 
	public ClientHttpRequestMessageSender(ClientHttpRequestFactory requestFactory) {
		setRequestFactory(requestFactory);
	} 
 
	public ClientHttpRequestFactory getRequestFactory() {
		return requestFactory;
	} 
 
	public void setRequestFactory(ClientHttpRequestFactory requestFactory) {
		Assert.notNull(requestFactory, "'requestFactory' must not be null");
		this.requestFactory = requestFactory;
	} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
@EBean 
public class SelfossApiRequestFactory extends SimpleClientHttpRequestFactory implements HostnameVerifier, X509TrustManager {
 
	@Bean protected SelfossAccount account;
 
	public SelfossApiRequestFactory() { 
		trustAllHosts(); 
	} 
 
	@Override 
	protected void prepareConnection(HttpURLConnection connection, String httpMethod) throws IOException {
		if (account.trustAllCertificates() && connection instanceof HttpsURLConnection) {
			((HttpsURLConnection) connection).setHostnameVerifier(this);
		} 
		super.prepareConnection(connection, httpMethod);
	} 
 
	@Override 
	public boolean verify(String s, SSLSession sslSession) {
		return true; 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
		runtimeOperations = new RuntimeTemplate(this); 
		completionOperations = new CompletionTemplate(this); 
	} 
 
	public SpringXDTemplate(URI baseURI) { 
		this(new SimpleClientHttpRequestFactory(), baseURI); 
	} 
 
	@Override 
	public StreamOperations streamOperations() { 
		return streamOperations; 
	} 
 
	@Override 
	public JobOperations jobOperations() { 
		return jobOperations; 
	} 
 
	@Override 
	public ModuleOperations moduleOperations() { 
3
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Spring Framework SimpleClientHttpRequestFactory Methods: