ClientHttpRequestFactory implementation based on Jetty's HttpClient.
| Modifier and Type | Field and Description |
|---|---|
| private final boolean | |
| private final HttpClient | |
| private long |
| Access | Constructor and Description |
|---|---|
| public | |
| public | JettyClientHttpRequestFactory(HttpClient
the httpClient)Constructor that takes a customized |
| private |
| Modifier and Type | Method and Description |
|---|---|
| public void | afterPropertiesSet()
Implements org. BeanFactory after it has set all bean properties
and satisfied BeanFactoryAware, ApplicationContextAware etc.
This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set. |
| public ClientHttpRequest | createRequest(URI
the URI to create a request for uri, HttpMethod the HTTP method to execute httpMethod)Implements org. ClientHttpRequest for the specified URI and HTTP method.
|
| public void | destroy()
Implements org. BeanFactory on destruction of a bean.
|
| public void | |
| public void | |
| public void | |
| public void | |
| private void |
| defaultClient | back to summary |
|---|---|
| private final boolean defaultClient | |
| httpClient | back to summary |
|---|---|
| private final HttpClient httpClient | |
| readTimeout | back to summary |
|---|---|
| private long readTimeout | |
| JettyClientHttpRequestFactory | back to summary |
|---|---|
| public JettyClientHttpRequestFactory() Default constructor that creates a new instance of | |
| JettyClientHttpRequestFactory | back to summary |
|---|---|
| public JettyClientHttpRequestFactory(HttpClient httpClient) Constructor that takes a customized
| |
| JettyClientHttpRequestFactory | back to summary |
|---|---|
| private JettyClientHttpRequestFactory(HttpClient httpClient, boolean defaultClient) | |
| afterPropertiesSet | back to summary |
|---|---|
| public void afterPropertiesSet() throws Exception Implements org. Doc from org. Invoked by the containing This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set. | |
| createRequest | back to summary |
|---|---|
| public ClientHttpRequest createRequest(URI uri, HttpMethod httpMethod) throws IOException Implements org. Doc from org. Create a new The returned request can be written to, and then executed by calling
| |
| destroy | back to summary |
|---|---|
| public void destroy() throws Exception Implements org. Doc from org. Invoked by the containing | |
| setConnectTimeout | back to summary |
|---|---|
| public void setConnectTimeout(int connectTimeout) Set the underlying connect timeout in milliseconds. A value of 0 specifies an infinite timeout. Default is 5 seconds. | |
| setConnectTimeout | back to summary |
|---|---|
| public void setConnectTimeout(Duration connectTimeout) Set the underlying connect timeout in milliseconds. A value of 0 specifies an infinite timeout. Default is 5 seconds. | |
| setReadTimeout | back to summary |
|---|---|
| public void setReadTimeout(long readTimeout) Set the underlying read timeout in milliseconds. Default is 10 seconds. | |
| setReadTimeout | back to summary |
|---|---|
| public void setReadTimeout(Duration readTimeout) Set the underlying read timeout as Default is 10 seconds. | |
| startHttpClient | back to summary |
|---|---|
| private void startHttpClient() throws Exception | |