Class ApacheConnectorProperties
- java.lang.Object
-
- com.oracle.bmc.http.ApacheConnectorProperties
-
public class ApacheConnectorProperties extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classApacheConnectorProperties.ApacheConnectorPropertiesBuilder
-
Field Summary
Fields Modifier and Type Field Description static intDEFAULT_IDLE_CONNECTION_MONITOR_THREAD_WAIT_TIME_IN_SECONDS
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ApacheConnectorProperties.ApacheConnectorPropertiesBuilderbuilder()protected booleancanEqual(Object other)booleanequals(Object o)ApacheConnectionClosingStrategygetConnectionClosingStrategy()Strategy that closes the Apache Connection.org.apache.http.conn.HttpClientConnectionManagergetConnectionManager()Connection Manager which will be used to create the Apache HttpClient.ApacheConnectionPoolConfiggetConnectionPoolConfig()ApacheConnectionPoolConfig for the connection pooling The value MUST be an instance of ApacheConnectionPoolConfigIf the property is absent then default option of pool config will be used
org.apache.http.ConnectionReuseStrategygetConnectionReuseStrategy()ConnectionReuseStrategy for the Apache HttpClient.HostnameVerifiergetHostnameVerifier()HostnameVerifier to be used for the Apache Connection.intgetIdleConnectionMonitorThreadIdleTimeoutInSeconds()The idle timeout - close connections that have been idle longer than idleConnectionMonitorThreadIdleTimeoutInSeconds seconds by idleMonitorThread.intgetIdleConnectionMonitorThreadWaitTimeInSeconds()The time interval after which the check and closing of expired/idle connections is performed by the idleMonitorThread.org.apache.http.conn.ConnectionKeepAliveStrategygetKeepAliveStrategy()ConnectionKeepAliveStrategy for the Apache HttpClient.org.apache.http.client.HttpRequestRetryHandlergetRequestRetryHandler()Request RetryHandler to be used for the Apache Connection.SSLContextgetSslContext()SSLContext to be used for the Apache Connection.inthashCode()booleanisConnectionManagerShared()A value of true indicates that configured connection manager should be shared among multiple Jersey ClientRuntime instances.booleanisConnectionPooling()A value that indicates whether connection pooling will be enabled.booleanisExpectContinue()A value that indicates whether to support expect 100 continue behavior for the Apache HttpClient.booleanisIdleConnectionMonitorThreadEnabled()Idle monitor thread polls the connection manager to monitor for expired and idle connections and closes any such connectionsIf the property is absent then default value of false will be used
StringtoString()
-
-
-
Method Detail
-
builder
public static ApacheConnectorProperties.ApacheConnectorPropertiesBuilder builder()
-
canEqual
protected boolean canEqual(Object other)
-
getKeepAliveStrategy
public org.apache.http.conn.ConnectionKeepAliveStrategy getKeepAliveStrategy()
ConnectionKeepAliveStrategy for the Apache HttpClient.The value MUST be an instance of ConnectionKeepAliveStrategy.
If the property is absent the default keepalive strategy of the Apache HTTP library will be used
-
isConnectionManagerShared
public boolean isConnectionManagerShared()
A value of true indicates that configured connection manager should be shared among multiple Jersey ClientRuntime instances.It means that closing a particular ClientRuntime instance does not shut down the underlying connection manager automatically. In such case, the connection manager life-cycle should be fully managed by the application code. To release all allocated resources, caller code should especially ensure HttpClientConnectionManager.shutdown() gets invoked eventually. This property may only be set prior to constructing Apache connector using ApacheConnectorProvider.
The value MUST be boolean
-
getConnectionManager
public org.apache.http.conn.HttpClientConnectionManager getConnectionManager()
Connection Manager which will be used to create the Apache HttpClient.This takes precedence over the default pooling configuration The value MUST be an instance of HttpClientConnectionManager.
If the property is absent a default Connection Manager will be used (PoolingHttpClientConnectionManager)
-
getConnectionReuseStrategy
public org.apache.http.ConnectionReuseStrategy getConnectionReuseStrategy()
ConnectionReuseStrategy for the Apache HttpClient.The value MUST be an instance of org.apache.http.impl.ConnectionReuseStrategy.
If the property is absent the default reuse strategy of the Apache HTTP library will be used
-
isConnectionPooling
public boolean isConnectionPooling()
A value that indicates whether connection pooling will be enabled.The value MUST be boolean
If the property is absent then default option of pooling will be used If the property is false, then the thread-safe BasicHttpClientConnectionManager is used for the Apache HttpClient A connection manager for a single connection. This connection manager maintains only one active connection. Even though this class is fully thread-safe it ought to be used by one execution thread only, as only one thread a time can lease the connection at a time. This connection manager implementation should be used inside an EJB container
-
getConnectionPoolConfig
public ApacheConnectionPoolConfig getConnectionPoolConfig()
ApacheConnectionPoolConfig for the connection pooling The value MUST be an instance of ApacheConnectionPoolConfigIf the property is absent then default option of pool config will be used
-
isExpectContinue
public boolean isExpectContinue()
A value that indicates whether to support expect 100 continue behavior for the Apache HttpClient.If this value is true, and the Apache HttpClient is used, and operation supports expect 100 continue, then this request header will be emitted.
The value MUST be boolean.
If the property is absent then default option of true will be used.
-
getConnectionClosingStrategy
public ApacheConnectionClosingStrategy getConnectionClosingStrategy()
Strategy that closes the Apache Connection.Accepts an instance of ApacheConnectionClosingStrategy. The value MUST be an instance of ApacheConnectionClosingStrategy.
If the property is absent then default option of ApacheConnectionClosingStrategy.ImmediateClosingStrategy will be used
Note: When using ApacheConnectionClosingStrategy.GracefulClosingStrategy, streams returned from response are read till the end of the stream when closing the stream. This can introduce additional time when closing the stream with partial read, depending on how large the remaining stream is. Use ApacheConnectionClosingStrategy.ImmediateClosingStrategy for large files with partial reads instead for faster close. ApacheConnectionClosingStrategy.ImmediateClosingStrategy on the other hand takes longer when using partial read for smaller stream size (< 1MB). Please consider your use-case and change accordingly. Please use ApacheConnectorPropertiesExample for reference
-
getSslContext
public SSLContext getSslContext()
SSLContext to be used for the Apache Connection.Accepts an instance of SSLContext. The value MUST be an instance of SSLContext.
If the property is absent then default value of null will be used
-
getHostnameVerifier
public HostnameVerifier getHostnameVerifier()
HostnameVerifier to be used for the Apache Connection.Accepts an instance of HostnameVerifier. The value MUST be an instance of HostnameVerifier.
If the property is absent then default value of null will be used
-
getRequestRetryHandler
public org.apache.http.client.HttpRequestRetryHandler getRequestRetryHandler()
Request RetryHandler to be used for the Apache Connection.Accepts an instance of HttpRequestRetryHandler
-
isIdleConnectionMonitorThreadEnabled
public boolean isIdleConnectionMonitorThreadEnabled()
Idle monitor thread polls the connection manager to monitor for expired and idle connections and closes any such connectionsIf the property is absent then default value of false will be used
-
getIdleConnectionMonitorThreadWaitTimeInSeconds
public int getIdleConnectionMonitorThreadWaitTimeInSeconds()
The time interval after which the check and closing of expired/idle connections is performed by the idleMonitorThread.This is applicable only if idleConnectionMonitorThead is enabled/true
If the property is absent then default value of 5 seconds will be used
-
getIdleConnectionMonitorThreadIdleTimeoutInSeconds
public int getIdleConnectionMonitorThreadIdleTimeoutInSeconds()
The idle timeout - close connections that have been idle longer than idleConnectionMonitorThreadIdleTimeoutInSeconds seconds by idleMonitorThread.This is applicable only if idleConnectionMonitorThead is enabled/true
If the property is absent then default value of 20 seconds will be used
-
-