public class StreamClientImpl extends AbstractStreamClient<StreamClientConfigurationImpl,StreamClientImpl.HttpContentExchange>
This implementation works on Android, dependencies are the jetty-client
Maven module.
Modifier and Type | Class and Description |
---|---|
static class |
StreamClientImpl.HttpContentExchange |
Modifier and Type | Field and Description |
---|---|
protected org.eclipse.jetty.client.HttpClient |
client |
protected StreamClientConfigurationImpl |
configuration |
Constructor and Description |
---|
StreamClientImpl(StreamClientConfigurationImpl configuration) |
Modifier and Type | Method and Description |
---|---|
protected void |
abort(StreamClientImpl.HttpContentExchange exchange)
Cancel and abort the request immediately, with the proprietary API.
|
protected Callable<StreamResponseMessage> |
createCallable(StreamRequestMessage requestMessage,
StreamClientImpl.HttpContentExchange exchange)
Create a callable procedure that will execute the request.
|
protected StreamClientImpl.HttpContentExchange |
createRequest(StreamRequestMessage requestMessage)
Create a proprietary representation of this request, log warnings and
return
null if creation fails. |
StreamClientConfigurationImpl |
getConfiguration() |
protected boolean |
logExecutionException(Throwable t) |
void |
stop()
Stops the service, closes any connection pools etc.
|
onFinally, sendRequest
protected final StreamClientConfigurationImpl configuration
protected final org.eclipse.jetty.client.HttpClient client
public StreamClientImpl(StreamClientConfigurationImpl configuration) throws InitializationException
InitializationException
public StreamClientConfigurationImpl getConfiguration()
protected StreamClientImpl.HttpContentExchange createRequest(StreamRequestMessage requestMessage)
AbstractStreamClient
null
if creation fails.createRequest
in class AbstractStreamClient<StreamClientConfigurationImpl,StreamClientImpl.HttpContentExchange>
protected Callable<StreamResponseMessage> createCallable(StreamRequestMessage requestMessage, StreamClientImpl.HttpContentExchange exchange)
AbstractStreamClient
createCallable
in class AbstractStreamClient<StreamClientConfigurationImpl,StreamClientImpl.HttpContentExchange>
protected void abort(StreamClientImpl.HttpContentExchange exchange)
AbstractStreamClient
abort
in class AbstractStreamClient<StreamClientConfigurationImpl,StreamClientImpl.HttpContentExchange>
protected boolean logExecutionException(Throwable t)
logExecutionException
in class AbstractStreamClient<StreamClientConfigurationImpl,StreamClientImpl.HttpContentExchange>
true
if no more logging of this exception should be done.public void stop()
StreamClient
Copyright © 2016 4th Line GmbH, Switzerland. All rights reserved.