public abstract class ObjectConfig<T extends ObjectConfig<T>>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ObjectConfig.ProtocolConverter |
static class |
ObjectConfig.VdcConverter |
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_CHUNKED_ENCODING_SIZE |
static int |
DEFAULT_CONNECT_TIMEOUT |
static int |
DEFAULT_READ_TIMEOUT |
static java.lang.String |
DEFAULT_USER_AGENT |
static java.lang.String |
PACKAGE_VERSION |
static java.lang.String |
PROPERTY_DISABLE_HEALTH_CHECK |
static java.lang.String |
PROPERTY_DISABLE_HOST_UPDATE |
static java.lang.String |
PROPERTY_POLL_INTERVAL |
static java.lang.String |
PROPERTY_POLL_PORT |
static java.lang.String |
PROPERTY_POLL_PROTOCOL |
static java.lang.String |
PROPERTY_PROXY_PASS |
static java.lang.String |
PROPERTY_PROXY_URI |
static java.lang.String |
PROPERTY_PROXY_USER |
Constructor and Description |
---|
ObjectConfig()
Empty constructor for internal use only!
|
ObjectConfig(ObjectConfig<T> other)
Cloning constructor.
|
ObjectConfig(Protocol protocol,
int port,
java.lang.String... hosts)
Single VDC constructor.
|
ObjectConfig(Protocol protocol,
int port,
com.emc.rest.smart.ecs.Vdc... vdcs)
Multiple VDC constructor.
|
ObjectConfig(java.net.URI endpoint)
Single endpoint constructor (disables smart-client).
|
Modifier and Type | Method and Description |
---|---|
int |
getChunkedEncodingSize() |
int |
getConnectTimeout() |
EncryptionConfig |
getEncryptionConfig()
Deprecated.
(2.0.3) always returns null (see
setEncryptionConfig(EncryptionConfig) ) |
java.lang.String |
getHost() |
java.lang.String |
getIdentity() |
java.lang.String |
getNamespace() |
int |
getPort() |
java.lang.String |
getPropAsString(java.lang.String propName) |
java.util.Map<java.lang.String,java.lang.Object> |
getProperties() |
java.lang.Object |
getProperty(java.lang.String propName) |
Protocol |
getProtocol() |
int |
getReadTimeout() |
java.lang.String |
getRootContext() |
java.lang.String |
getSecretKey() |
long |
getServerClockSkew() |
java.lang.String |
getSessionToken() |
java.lang.String |
getUserAgent() |
java.util.List<com.emc.rest.smart.ecs.Vdc> |
getVdcs() |
boolean |
isGeoPinningEnabled() |
boolean |
isGeoReadRetryFailover() |
boolean |
isSmartClient() |
protected java.lang.String |
propAsString(java.util.Map<java.lang.String,java.lang.Object> properties,
java.lang.String propName) |
abstract com.emc.rest.smart.Host |
resolveHost() |
java.net.URI |
resolvePath(java.lang.String subPath,
java.lang.String rawQuery)
Resolves a path relative to the API context.
|
void |
setChunkedEncodingSize(int chunkedEncodingSize)
If the parameter is not specified (0) then chunked encoding will not be used.
|
void |
setConnectTimeout(int connectTimeout) |
void |
setEncryptionConfig(EncryptionConfig encryptionConfig)
Deprecated.
(2.0.3) this method does nothing. EncryptionConfig instance should be passed to the constructor of
an encryption client
|
void |
setGeoPinningEnabled(boolean geoPinningEnabled)
Set to true to enable geo-pinning (hashes the object key and pins it to a specific VDC).
|
void |
setGeoReadRetryFailover(boolean geoReadRetryFailover)
Controls geo-pinning read retry fail-over.
|
void |
setHost(java.lang.String host)
Sets a single server host
|
void |
setIdentity(java.lang.String identity)
The ECS object user
|
void |
setNamespace(java.lang.String namespace)
The ECS namespace to use for the request
|
void |
setPort(int port)
The data port to use for requests, if different from the default
|
void |
setProperty(java.lang.String propName,
java.lang.Object value)
Allows custom properties to be set.
|
void |
setProtocol(Protocol protocol) |
void |
setReadTimeout(int readTimeout) |
void |
setRootContext(java.lang.String rootContext)
The root context of the object API service, if different from the default
|
void |
setSecretKey(java.lang.String secretKey)
The object user's secret key
|
void |
setServerClockSkew(long serverClockSkew)
Set to adjust for client-server clock skew in milliseconds.
|
void |
setSessionToken(java.lang.String sessionToken) |
void |
setSmartClient(boolean smartClient)
Set to false to disable the smart-client (client-side node discovery and load balancing).
|
void |
setUserAgent(java.lang.String userAgent)
Sets a custom User-Agent string.
|
void |
setVdcs(java.util.List<com.emc.rest.smart.ecs.Vdc> vdcs)
Sets the VDC/host list
|
com.emc.rest.smart.SmartConfig |
toSmartConfig() |
java.lang.String |
toString() |
T |
withChunkedEncodingSize(int chunkedEncodingSize) |
T |
withConnectTimeout(int connectTimeout) |
T |
withEncryptionConfig(EncryptionConfig encryptionConfig)
Deprecated.
(2.0.3) this method does nothing. EncryptionConfig instance should be passed to the constructor of
an encryption client
|
T |
withGeoPinningEnabled(boolean geoPinningEnabled) |
T |
withIdentity(java.lang.String identity) |
T |
withNamespace(java.lang.String namespace) |
T |
withPort(int port) |
T |
withProperty(java.lang.String propName,
java.lang.Object value) |
T |
withReadTimeout(int readTimeout) |
T |
withRootContext(java.lang.String rootContext) |
T |
withSecretKey(java.lang.String secretKey) |
T |
withSessionToken(java.lang.String sessionToken)
Session token:
You can use temporary security credentials provided by the STS to sign a request.
|
T |
withSmartClient(boolean smartClient) |
T |
withUserAgent(java.lang.String userAgent) |
public static final java.lang.String PROPERTY_POLL_PROTOCOL
public static final java.lang.String PROPERTY_POLL_PORT
public static final java.lang.String PROPERTY_POLL_INTERVAL
public static final java.lang.String PROPERTY_DISABLE_HEALTH_CHECK
public static final java.lang.String PROPERTY_DISABLE_HOST_UPDATE
public static final java.lang.String PROPERTY_PROXY_URI
public static final java.lang.String PROPERTY_PROXY_USER
public static final java.lang.String PROPERTY_PROXY_PASS
public static final java.lang.String PACKAGE_VERSION
public static final java.lang.String DEFAULT_USER_AGENT
public static final int DEFAULT_CHUNKED_ENCODING_SIZE
public static final int DEFAULT_CONNECT_TIMEOUT
public static final int DEFAULT_READ_TIMEOUT
public ObjectConfig()
public ObjectConfig(java.net.URI endpoint)
public ObjectConfig(Protocol protocol, int port, java.lang.String... hosts)
public ObjectConfig(Protocol protocol, int port, com.emc.rest.smart.ecs.Vdc... vdcs)
public ObjectConfig(ObjectConfig<T> other)
public abstract com.emc.rest.smart.Host resolveHost()
public java.net.URI resolvePath(java.lang.String subPath, java.lang.String rawQuery)
public com.emc.rest.smart.SmartConfig toSmartConfig()
protected java.lang.String propAsString(java.util.Map<java.lang.String,java.lang.Object> properties, java.lang.String propName)
public Protocol getProtocol()
public void setProtocol(Protocol protocol)
public java.util.List<com.emc.rest.smart.ecs.Vdc> getVdcs()
public void setVdcs(java.util.List<com.emc.rest.smart.ecs.Vdc> vdcs)
public java.lang.String getHost()
public void setHost(java.lang.String host)
public int getPort()
public void setPort(int port)
public boolean isSmartClient()
public void setSmartClient(boolean smartClient)
public java.lang.String getRootContext()
public void setRootContext(java.lang.String rootContext)
public java.lang.String getNamespace()
public void setNamespace(java.lang.String namespace)
public java.lang.String getIdentity()
public void setIdentity(java.lang.String identity)
public java.lang.String getSecretKey()
public void setSecretKey(java.lang.String secretKey)
public long getServerClockSkew()
public void setServerClockSkew(long serverClockSkew)
public java.lang.String getUserAgent()
public void setUserAgent(java.lang.String userAgent)
public EncryptionConfig getEncryptionConfig()
setEncryptionConfig(EncryptionConfig)
)public void setEncryptionConfig(EncryptionConfig encryptionConfig)
public boolean isGeoPinningEnabled()
public void setGeoPinningEnabled(boolean geoPinningEnabled)
public boolean isGeoReadRetryFailover()
public void setGeoReadRetryFailover(boolean geoReadRetryFailover)
public int getChunkedEncodingSize()
public void setChunkedEncodingSize(int chunkedEncodingSize)
public int getConnectTimeout()
public void setConnectTimeout(int connectTimeout)
public int getReadTimeout()
public void setReadTimeout(int readTimeout)
public java.lang.String getSessionToken()
public void setSessionToken(java.lang.String sessionToken)
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
public java.lang.Object getProperty(java.lang.String propName)
public java.lang.String getPropAsString(java.lang.String propName)
public void setProperty(java.lang.String propName, java.lang.Object value)
public T withPort(int port)
public T withSmartClient(boolean smartClient)
public T withRootContext(java.lang.String rootContext)
public T withNamespace(java.lang.String namespace)
public T withIdentity(java.lang.String identity)
public T withSecretKey(java.lang.String secretKey)
public T withSessionToken(java.lang.String sessionToken)
sessionToken
- public T withUserAgent(java.lang.String userAgent)
public T withEncryptionConfig(EncryptionConfig encryptionConfig)
public T withGeoPinningEnabled(boolean geoPinningEnabled)
public T withChunkedEncodingSize(int chunkedEncodingSize)
public T withConnectTimeout(int connectTimeout)
public T withReadTimeout(int readTimeout)
public T withProperty(java.lang.String propName, java.lang.Object value)
public java.lang.String toString()
toString
in class java.lang.Object