Class URLConnectionEngine
java.lang.Object
org.jboss.resteasy.client.jaxrs.engines.URLConnectionEngine
- All Implemented Interfaces:
ClientHttpEngine
- Version:
- $Revision: 1 $
- Author:
- Alexey Ogarkov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Integerprotected booleanprotected HostnameVerifierprotected Stringprotected Integerprotected Stringprotected Integerprotected SSLContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()protected voidcommitHeaders(ClientInvocation request, HttpURLConnection connection) Add headers to HttpURLConnection from ClientInvocation.protected HttpURLConnectioncreateConnection(ClientInvocation request) Create HttpUrlConnection from ClientInvorcation and set request method.protected voidexecuteRequest(ClientInvocation request, HttpURLConnection connection) Execute request using HttpURLConnection with body from invocation if needed.getHeaders(HttpURLConnection connection) Create map with response headers.{inheritDoc}{inheritDoc}jakarta.ws.rs.core.Responseinvoke(jakarta.ws.rs.client.Invocation inv) booleanvoidsetConnectTimeout(Integer connectTimeout) voidsetFollowRedirects(boolean followRedirects) voidsetHostnameVerifier(HostnameVerifier hostnameVerifier) voidsetProxyHost(String proxyHost) voidsetProxyPort(Integer proxyPort) voidsetProxyScheme(String proxyScheme) voidsetReadTimeout(Integer readTimeout) voidsetSslContext(SSLContext sslContext)
-
Field Details
-
sslContext
-
hostnameVerifier
-
readTimeout
-
connectTimeout
-
proxyHost
-
proxyPort
-
proxyScheme
-
followRedirects
protected boolean followRedirects
-
-
Constructor Details
-
URLConnectionEngine
public URLConnectionEngine()
-
-
Method Details
-
invoke
public jakarta.ws.rs.core.Response invoke(jakarta.ws.rs.client.Invocation inv) - Specified by:
invokein interfaceClientHttpEngine
-
getHeaders
Create map with response headers.- Parameters:
connection- - HttpURLConnection- Returns:
- map key - list of values
-
close
public void close()- Specified by:
closein interfaceClientHttpEngine
-
createConnection
Create HttpUrlConnection from ClientInvorcation and set request method.- Parameters:
request- ClientInvocation- Returns:
- HttpURLConnection with method & url already set
- Throws:
IOException- if url or io exceptions
-
executeRequest
Execute request using HttpURLConnection with body from invocation if needed.- Parameters:
request- ClientInvocationconnection- HttpURLConnection
-
commitHeaders
Add headers to HttpURLConnection from ClientInvocation. Should be executed before writing body.- Parameters:
request- ClientInvocationconnection- HttpURLConnection
-
getSslContext
{inheritDoc}- Specified by:
getSslContextin interfaceClientHttpEngine- Returns:
SSLContext
-
getHostnameVerifier
{inheritDoc}- Specified by:
getHostnameVerifierin interfaceClientHttpEngine- Returns:
HostnameVerifier
-
setSslContext
-
setHostnameVerifier
-
setConnectTimeout
-
setReadTimeout
-
setProxyHost
-
setProxyPort
-
setProxyScheme
-
setFollowRedirects
public void setFollowRedirects(boolean followRedirects) - Specified by:
setFollowRedirectsin interfaceClientHttpEngine
-
isFollowRedirects
public boolean isFollowRedirects()- Specified by:
isFollowRedirectsin interfaceClientHttpEngine
-