public abstract class AbstractAWSClientFactory<T extends AmazonWebServiceClient> extends java.lang.Object implements AWSClientFactory<T>
AmazonWebServiceClient based on the URL
passed to the getClient method| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
DEFAULT_PROTOCOL
The default protocol to be used in case none is provided
|
protected static java.lang.String |
HTTP
The String constant for HTTP
|
protected static java.lang.String |
HTTPS
The String constant for HTTPS
|
protected java.lang.String |
SMTP
The String constant for SMTP
|
| Constructor and Description |
|---|
AbstractAWSClientFactory() |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the complete cache
|
T |
getClient(java.lang.String url)
Returns the cached implementation of the
AmazonWebServiceClient based on the URL provided. |
protected abstract T |
getClientImplementation()
The subclass needs to implement this method and return an appropriate implementation
|
java.util.Map<java.lang.String,T> |
getClientMap()
Return a copy of the client map
|
protected static final java.lang.String HTTP
protected static final java.lang.String HTTPS
protected final java.lang.String SMTP
protected static final java.lang.String DEFAULT_PROTOCOL
public final T getClient(java.lang.String url)
AmazonWebServiceClient based on the URL provided.
the client instance is acquired using the abstract getClientImplementation method.
The instance is added to the client map with the endpoint string as the key and the
AmazonWebServiceClient as the value.getClient in interface AWSClientFactory<T extends AmazonWebServiceClient>url - the URL for which the client is requested.AmazonWebServiceClient to be used for the provided urlpublic final java.util.Map<java.lang.String,T> getClientMap()
public final void clear()
protected abstract T getClientImplementation()