Class ManualClosingApacheHttpClient43Engine
- java.lang.Object
-
- org.jboss.resteasy.client.jaxrs.engines.ManualClosingApacheHttpClient43Engine
-
- All Implemented Interfaces:
ClientHttpEngine
,ApacheHttpClientEngine
- Direct Known Subclasses:
ApacheHttpClient43Engine
@Deprecated(forRemoval=true, since="6.2") public class ManualClosingApacheHttpClient43Engine extends Object implements ApacheHttpClientEngine
Deprecated, for removal: This API element is subject to removal in a future version.This will be removed in a future release as the underlying default implementation of theClientHttpEngine
will be replaced.An Apache HTTP engine for use with the new Builder Config style.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClientEngine
ApacheHttpClientEngine.MemoryUnit
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
allowClosingHttpClient
Deprecated, for removal: This API element is subject to removal in a future version.protected boolean
chunked
Deprecated, for removal: This API element is subject to removal in a future version.protected AtomicBoolean
closed
Deprecated, for removal: This API element is subject to removal in a future version.protected org.apache.http.HttpHost
defaultProxy
Deprecated, for removal: This API element is subject to removal in a future version.protected int
fileUploadInMemoryThresholdLimit
Deprecated.protected ApacheHttpClientEngine.MemoryUnit
fileUploadMemoryUnit
Deprecated.protected Path
fileUploadTempFileDir
Deprecated, for removal: This API element is subject to removal in a future version.Temp directory to write output request stream to.protected boolean
followRedirects
Deprecated, for removal: This API element is subject to removal in a future version.protected HostnameVerifier
hostnameVerifier
Deprecated, for removal: This API element is subject to removal in a future version.protected org.apache.http.client.HttpClient
httpClient
Deprecated, for removal: This API element is subject to removal in a future version.protected HttpContextProvider
httpContextProvider
Deprecated, for removal: This API element is subject to removal in a future version.protected int
responseBufferSize
Deprecated, for removal: This API element is subject to removal in a future version.protected SSLContext
sslContext
Deprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Summary
Constructors Constructor Description ManualClosingApacheHttpClient43Engine()
Deprecated, for removal: This API element is subject to removal in a future version.ManualClosingApacheHttpClient43Engine(org.apache.http.client.HttpClient httpClient)
Deprecated, for removal: This API element is subject to removal in a future version.ManualClosingApacheHttpClient43Engine(org.apache.http.client.HttpClient httpClient, boolean closeHttpClient)
Deprecated, for removal: This API element is subject to removal in a future version.ManualClosingApacheHttpClient43Engine(org.apache.http.client.HttpClient httpClient, HttpContextProvider httpContextProvider)
Deprecated, for removal: This API element is subject to removal in a future version.ManualClosingApacheHttpClient43Engine(org.apache.http.HttpHost defaultProxy)
Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected org.apache.http.HttpEntity
buildEntity(ClientInvocation request)
Deprecated, for removal: This API element is subject to removal in a future version.Build the HttpEntity to be sent to the Service as part of (POST) request.protected void
cleanUpAfterExecute(org.apache.http.client.methods.HttpRequestBase httpMethod)
Deprecated, for removal: This API element is subject to removal in a future version.If passed httpMethod is of type HttpPost then obtain its entity.void
close()
Deprecated, for removal: This API element is subject to removal in a future version.protected void
commitHeaders(ClientInvocation request, org.apache.http.client.methods.HttpRequestBase httpMethod)
Deprecated, for removal: This API element is subject to removal in a future version.protected InputStream
createBufferedStream(InputStream is)
Deprecated, for removal: This API element is subject to removal in a future version.protected org.apache.http.client.HttpClient
createDefaultHttpClient()
Deprecated, for removal: This API element is subject to removal in a future version.protected org.apache.http.client.methods.HttpRequestBase
createHttpMethod(String url, String restVerb)
Deprecated, for removal: This API element is subject to removal in a future version.static CaseInsensitiveMap<String>
extractHeaders(org.apache.http.HttpResponse response)
Deprecated, for removal: This API element is subject to removal in a future version.org.apache.http.HttpHost
getDefaultProxy()
Deprecated, for removal: This API element is subject to removal in a future version.int
getFileUploadInMemoryThresholdLimit()
Deprecated.Threshold
getFileUploadMemoryThreshold()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the memory threshold of the amount of data to hold in memory.ApacheHttpClientEngine.MemoryUnit
getFileUploadMemoryUnit()
Deprecated.File
getFileUploadTempFileDir()
Deprecated, for removal: This API element is subject to removal in a future version.HostnameVerifier
getHostnameVerifier()
Deprecated, for removal: This API element is subject to removal in a future version.Needed for Client.getHostnameVerifier()org.apache.http.client.HttpClient
getHttpClient()
Deprecated, for removal: This API element is subject to removal in a future version.int
getResponseBufferSize()
Deprecated, for removal: This API element is subject to removal in a future version.Response stream is wrapped in a BufferedInputStream.SSLContext
getSslContext()
Deprecated, for removal: This API element is subject to removal in a future version.Needed for Client.getSslContext();protected String
getTempfilePrefix()
Deprecated, for removal: This API element is subject to removal in a future version.Use context information, which will include node name, to avoid conflicts in case of multiple VMS using same temp directory location.jakarta.ws.rs.core.Response
invoke(jakarta.ws.rs.client.Invocation inv)
Deprecated, for removal: This API element is subject to removal in a future version.boolean
isChunked()
Deprecated, for removal: This API element is subject to removal in a future version.boolean
isClosed()
Deprecated, for removal: This API element is subject to removal in a future version.boolean
isFollowRedirects()
Deprecated, for removal: This API element is subject to removal in a future version.protected void
loadHttpMethod(ClientInvocation request, org.apache.http.client.methods.HttpRequestBase httpMethod)
Deprecated, for removal: This API element is subject to removal in a future version.void
setChunked(boolean chunked)
Deprecated, for removal: This API element is subject to removal in a future version.void
setFileUploadInMemoryThresholdLimit(int fileUploadInMemoryThresholdLimit)
Deprecated.void
setFileUploadMemoryThreshold(Threshold threshold)
Deprecated, for removal: This API element is subject to removal in a future version.Sets the memory threshold for the amount of content to hold in memory before it offloads to offline storage.void
setFileUploadMemoryUnit(ApacheHttpClientEngine.MemoryUnit fileUploadMemoryUnit)
Deprecated.void
setFileUploadTempFileDir(File fileUploadTempFileDir)
Deprecated, for removal: This API element is subject to removal in a future version.void
setFollowRedirects(boolean followRedirects)
Deprecated, for removal: This API element is subject to removal in a future version.void
setHostnameVerifier(HostnameVerifier hostnameVerifier)
Deprecated, for removal: This API element is subject to removal in a future version.protected void
setRedirectNotRequired(ClientInvocation request, org.apache.http.client.methods.HttpRequestBase httpMethod)
Deprecated, for removal: This API element is subject to removal in a future version.protected void
setRedirectRequired(ClientInvocation request, org.apache.http.client.methods.HttpRequestBase httpMethod)
Deprecated, for removal: This API element is subject to removal in a future version.void
setResponseBufferSize(int responseBufferSize)
Deprecated, for removal: This API element is subject to removal in a future version.Response stream is wrapped in a BufferedInputStream.void
setSslContext(SSLContext sslContext)
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
-
Field Detail
-
httpClient
protected final org.apache.http.client.HttpClient httpClient
Deprecated, for removal: This API element is subject to removal in a future version.
-
closed
protected final AtomicBoolean closed
Deprecated, for removal: This API element is subject to removal in a future version.
-
allowClosingHttpClient
protected final boolean allowClosingHttpClient
Deprecated, for removal: This API element is subject to removal in a future version.
-
httpContextProvider
protected HttpContextProvider httpContextProvider
Deprecated, for removal: This API element is subject to removal in a future version.
-
sslContext
protected SSLContext sslContext
Deprecated, for removal: This API element is subject to removal in a future version.
-
hostnameVerifier
protected HostnameVerifier hostnameVerifier
Deprecated, for removal: This API element is subject to removal in a future version.
-
responseBufferSize
protected int responseBufferSize
Deprecated, for removal: This API element is subject to removal in a future version.
-
defaultProxy
protected org.apache.http.HttpHost defaultProxy
Deprecated, for removal: This API element is subject to removal in a future version.
-
chunked
protected boolean chunked
Deprecated, for removal: This API element is subject to removal in a future version.
-
followRedirects
protected boolean followRedirects
Deprecated, for removal: This API element is subject to removal in a future version.
-
fileUploadInMemoryThresholdLimit
@Deprecated protected int fileUploadInMemoryThresholdLimit
Deprecated.For uploading File's over JAX-RS framework, this property, together withfileUploadMemoryUnit
, defines the maximum File size allowed in memory. If fileSize exceeds this size, it will be stored tofileUploadTempFileDir
.
Defaults to 1 MB
-
fileUploadMemoryUnit
@Deprecated protected ApacheHttpClientEngine.MemoryUnit fileUploadMemoryUnit
Deprecated.- See Also:
ApacheHttpClientEngine.MemoryUnit
-
fileUploadTempFileDir
protected Path fileUploadTempFileDir
Deprecated, for removal: This API element is subject to removal in a future version.Temp directory to write output request stream to. Any file to be uploaded has to be written out to the output request stream to be sent to the service and when the File is too huge the output request stream is written out to the disk rather than to memory.
Defaults to JVM temp directory.
-
-
Constructor Detail
-
ManualClosingApacheHttpClient43Engine
public ManualClosingApacheHttpClient43Engine()
Deprecated, for removal: This API element is subject to removal in a future version.
-
ManualClosingApacheHttpClient43Engine
public ManualClosingApacheHttpClient43Engine(org.apache.http.HttpHost defaultProxy)
Deprecated, for removal: This API element is subject to removal in a future version.
-
ManualClosingApacheHttpClient43Engine
public ManualClosingApacheHttpClient43Engine(org.apache.http.client.HttpClient httpClient)
Deprecated, for removal: This API element is subject to removal in a future version.
-
ManualClosingApacheHttpClient43Engine
public ManualClosingApacheHttpClient43Engine(org.apache.http.client.HttpClient httpClient, boolean closeHttpClient)
Deprecated, for removal: This API element is subject to removal in a future version.
-
ManualClosingApacheHttpClient43Engine
public ManualClosingApacheHttpClient43Engine(org.apache.http.client.HttpClient httpClient, HttpContextProvider httpContextProvider)
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Detail
-
getResponseBufferSize
public int getResponseBufferSize()
Deprecated, for removal: This API element is subject to removal in a future version.Response stream is wrapped in a BufferedInputStream. Default is 8192. Value of 0 will not wrap it. Value of -1 will use a SelfExpandingBufferedInputStream- Returns:
- response buffer size
-
setResponseBufferSize
public void setResponseBufferSize(int responseBufferSize)
Deprecated, for removal: This API element is subject to removal in a future version.Response stream is wrapped in a BufferedInputStream. Default is 8192. Value of 0 will not wrap it. Value of -1 will use a SelfExpandingBufferedInputStream- Parameters:
responseBufferSize
- response buffer size
-
getFileUploadInMemoryThresholdLimit
@Deprecated public int getFileUploadInMemoryThresholdLimit()
Deprecated.Based on memory unit- Returns:
- threshold limit
-
setFileUploadInMemoryThresholdLimit
@Deprecated public void setFileUploadInMemoryThresholdLimit(int fileUploadInMemoryThresholdLimit)
Deprecated.
-
getFileUploadMemoryThreshold
public Threshold getFileUploadMemoryThreshold()
Deprecated, for removal: This API element is subject to removal in a future version.Returns the memory threshold of the amount of data to hold in memory.- Returns:
- the memory threshold
-
setFileUploadMemoryThreshold
public void setFileUploadMemoryThreshold(Threshold threshold)
Deprecated, for removal: This API element is subject to removal in a future version.Sets the memory threshold for the amount of content to hold in memory before it offloads to offline storage.- Parameters:
threshold
- the in memory threshold
-
getFileUploadMemoryUnit
@Deprecated public ApacheHttpClientEngine.MemoryUnit getFileUploadMemoryUnit()
Deprecated.
-
setFileUploadMemoryUnit
@Deprecated public void setFileUploadMemoryUnit(ApacheHttpClientEngine.MemoryUnit fileUploadMemoryUnit)
Deprecated.
-
getFileUploadTempFileDir
public File getFileUploadTempFileDir()
Deprecated, for removal: This API element is subject to removal in a future version.
-
setFileUploadTempFileDir
public void setFileUploadTempFileDir(File fileUploadTempFileDir)
Deprecated, for removal: This API element is subject to removal in a future version.
-
getHttpClient
public org.apache.http.client.HttpClient getHttpClient()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getSslContext
public SSLContext getSslContext()
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:ClientHttpEngine
Needed for Client.getSslContext();- Specified by:
getSslContext
in interfaceClientHttpEngine
- Returns:
SSLContext
-
setSslContext
public void setSslContext(SSLContext sslContext)
Deprecated, for removal: This API element is subject to removal in a future version.
-
getHostnameVerifier
public HostnameVerifier getHostnameVerifier()
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:ClientHttpEngine
Needed for Client.getHostnameVerifier()- Specified by:
getHostnameVerifier
in interfaceClientHttpEngine
- Returns:
HostnameVerifier
-
setHostnameVerifier
public void setHostnameVerifier(HostnameVerifier hostnameVerifier)
Deprecated, for removal: This API element is subject to removal in a future version.
-
extractHeaders
public static CaseInsensitiveMap<String> extractHeaders(org.apache.http.HttpResponse response)
Deprecated, for removal: This API element is subject to removal in a future version.
-
createBufferedStream
protected InputStream createBufferedStream(InputStream is)
Deprecated, for removal: This API element is subject to removal in a future version.
-
invoke
public jakarta.ws.rs.core.Response invoke(jakarta.ws.rs.client.Invocation inv)
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
invoke
in interfaceClientHttpEngine
-
createHttpMethod
protected org.apache.http.client.methods.HttpRequestBase createHttpMethod(String url, String restVerb)
Deprecated, for removal: This API element is subject to removal in a future version.
-
loadHttpMethod
protected void loadHttpMethod(ClientInvocation request, org.apache.http.client.methods.HttpRequestBase httpMethod) throws Exception
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
Exception
-
commitHeaders
protected void commitHeaders(ClientInvocation request, org.apache.http.client.methods.HttpRequestBase httpMethod)
Deprecated, for removal: This API element is subject to removal in a future version.
-
isChunked
public boolean isChunked()
Deprecated, for removal: This API element is subject to removal in a future version.
-
setChunked
public void setChunked(boolean chunked)
Deprecated, for removal: This API element is subject to removal in a future version.
-
isFollowRedirects
public boolean isFollowRedirects()
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
isFollowRedirects
in interfaceClientHttpEngine
-
setFollowRedirects
public void setFollowRedirects(boolean followRedirects)
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
setFollowRedirects
in interfaceClientHttpEngine
-
cleanUpAfterExecute
protected void cleanUpAfterExecute(org.apache.http.client.methods.HttpRequestBase httpMethod)
Deprecated, for removal: This API element is subject to removal in a future version.If passed httpMethod is of type HttpPost then obtain its entity. If the entity has an enclosing File then delete it by invoking this method after the request has completed. The entity will have an enclosing File only if it was too huge to fit into memory.- Parameters:
httpMethod
- - the httpMethod to clean up.
-
buildEntity
protected org.apache.http.HttpEntity buildEntity(ClientInvocation request) throws IOException
Deprecated, for removal: This API element is subject to removal in a future version.Build the HttpEntity to be sent to the Service as part of (POST) request. Creates a off-memoryFileEntity
or a regular in-memoryByteArrayEntity
depending on if the request OutputStream fit into memory when built by calling.- Parameters:
request
- -- Returns:
- - the built HttpEntity
- Throws:
IOException
- -
-
getTempfilePrefix
protected String getTempfilePrefix()
Deprecated, for removal: This API element is subject to removal in a future version.Use context information, which will include node name, to avoid conflicts in case of multiple VMS using same temp directory location.- Returns:
- -
-
createDefaultHttpClient
protected org.apache.http.client.HttpClient createDefaultHttpClient()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getDefaultProxy
public org.apache.http.HttpHost getDefaultProxy()
Deprecated, for removal: This API element is subject to removal in a future version.
-
setRedirectRequired
protected void setRedirectRequired(ClientInvocation request, org.apache.http.client.methods.HttpRequestBase httpMethod)
Deprecated, for removal: This API element is subject to removal in a future version.
-
setRedirectNotRequired
protected void setRedirectNotRequired(ClientInvocation request, org.apache.http.client.methods.HttpRequestBase httpMethod)
Deprecated, for removal: This API element is subject to removal in a future version.
-
isClosed
public boolean isClosed()
Deprecated, for removal: This API element is subject to removal in a future version.
-
close
public void close()
Deprecated, for removal: This API element is subject to removal in a future version.- Specified by:
close
in interfaceClientHttpEngine
-
-