public class JettyClientEngine extends Object implements AsyncClientHttpEngine
AsyncClientHttpEngine.ResultExtractor<T>
Modifier and Type | Field and Description |
---|---|
static String |
FOLLOW_REDIRECTS |
static String |
REQUEST_TIMEOUT_MS |
Constructor and Description |
---|
JettyClientEngine(org.eclipse.jetty.client.HttpClient client) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
HostnameVerifier |
getHostnameVerifier()
Needed for Client.getHostnameVerifier()
|
SSLContext |
getSslContext()
Needed for Client.getSslContext();
|
ClientResponse |
invoke(ClientInvocation invocation) |
<T> Future<T> |
submit(ClientInvocation invocation,
boolean bufIn,
javax.ws.rs.client.InvocationCallback<T> callback,
AsyncClientHttpEngine.ResultExtractor<T> extractor)
Implementation note: due to lack of asynchronous message decoders the request must either be buffered,
or it must have a
null extractor and type parameter <T> must be ClientResponse ,
which will read the data through its stream. |
public static final String REQUEST_TIMEOUT_MS
public static final String FOLLOW_REDIRECTS
public JettyClientEngine(org.eclipse.jetty.client.HttpClient client)
public SSLContext getSslContext()
ClientHttpEngine
getSslContext
in interface ClientHttpEngine
SSLContext
public HostnameVerifier getHostnameVerifier()
ClientHttpEngine
getHostnameVerifier
in interface ClientHttpEngine
HostnameVerifier
public ClientResponse invoke(ClientInvocation invocation)
invoke
in interface ClientHttpEngine
public <T> Future<T> submit(ClientInvocation invocation, boolean bufIn, javax.ws.rs.client.InvocationCallback<T> callback, AsyncClientHttpEngine.ResultExtractor<T> extractor)
null
extractor and type parameter <T>
must be ClientResponse
,
which will read the data through its stream. It is not possible to use the synchronous JAX-RS message
decoding infrastructure without buffering or spinning up auxiliary threads (arguably more expensive than buffering).submit
in interface AsyncClientHttpEngine
T
- typeinvocation
- RequestbufIn
- buffer the response?callback
- Optional callback receiving the result, which is run inside the io-thread. may be null.extractor
- ResultExtractor for extracting a result out of a ClientResponse. Is run inside the io-threadAsyncClientHttpEngine.submit(ClientInvocation, boolean, InvocationCallback, org.jboss.resteasy.client.jaxrs.AsyncClientHttpEngine.ResultExtractor)
public void close()
close
in interface ClientHttpEngine
Copyright © 2018 JBoss by Red Hat. All rights reserved.