Class ObjectConfig<T extends ObjectConfig<T>>

  • Direct Known Subclasses:
    S3Config

    public abstract class ObjectConfig<T extends ObjectConfig<T>>
    extends java.lang.Object
    • Field Detail

      • PROPERTY_POLL_PROTOCOL

        public static final java.lang.String PROPERTY_POLL_PROTOCOL
        See Also:
        Constant Field Values
      • PROPERTY_POLL_PORT

        public static final java.lang.String PROPERTY_POLL_PORT
        See Also:
        Constant Field Values
      • PROPERTY_POLL_INTERVAL

        public static final java.lang.String PROPERTY_POLL_INTERVAL
        See Also:
        Constant Field Values
      • PROPERTY_DISABLE_HEALTH_CHECK

        public static final java.lang.String PROPERTY_DISABLE_HEALTH_CHECK
        See Also:
        Constant Field Values
      • PROPERTY_DISABLE_HOST_UPDATE

        public static final java.lang.String PROPERTY_DISABLE_HOST_UPDATE
        See Also:
        Constant Field Values
      • PROPERTY_PROXY_URI

        public static final java.lang.String PROPERTY_PROXY_URI
        See Also:
        Constant Field Values
      • PROPERTY_PROXY_USER

        public static final java.lang.String PROPERTY_PROXY_USER
        See Also:
        Constant Field Values
      • PROPERTY_PROXY_PASS

        public static final java.lang.String PROPERTY_PROXY_PASS
        See Also:
        Constant Field Values
      • PACKAGE_VERSION

        public static final java.lang.String PACKAGE_VERSION
      • DEFAULT_USER_AGENT

        public static final java.lang.String DEFAULT_USER_AGENT
      • DEFAULT_CHUNKED_ENCODING_SIZE

        public static final int DEFAULT_CHUNKED_ENCODING_SIZE
        See Also:
        Constant Field Values
      • DEFAULT_CONNECT_TIMEOUT

        public static final int DEFAULT_CONNECT_TIMEOUT
        See Also:
        Constant Field Values
    • Constructor Detail

      • ObjectConfig

        public ObjectConfig()
        Empty constructor for internal use only!
      • ObjectConfig

        public ObjectConfig​(java.net.URI endpoint)
        Single endpoint constructor (disables smart-client).
      • ObjectConfig

        public ObjectConfig​(Protocol protocol,
                            int port,
                            java.lang.String... hosts)
        Single VDC constructor.
      • ObjectConfig

        public ObjectConfig​(Protocol protocol,
                            int port,
                            com.emc.rest.smart.ecs.Vdc... vdcs)
        Multiple VDC constructor.
      • ObjectConfig

        public ObjectConfig​(ObjectConfig<T> other)
        Cloning constructor.
    • Method Detail

      • resolveHost

        public abstract com.emc.rest.smart.Host resolveHost()
      • resolvePath

        public java.net.URI resolvePath​(java.lang.String subPath,
                                        java.lang.String rawQuery)
        Resolves a path relative to the API context. The returned URI will be of the format scheme://host[:port][/rootContext]/subPath?query. The scheme and port are pulled from the first endpoint in the endpoints list. The host to use may be virtual (to be resolved by a load balancer) or calculated in implementations as round-robin or single-host. Note this is not to be confused with the client-side load balancing provided by the smart client, which overrides any host set here. Note that the query string must already be encoded. This is the only way too allow ampersands (&) as part of a paremeter value
      • toSmartConfig

        public com.emc.rest.smart.SmartConfig toSmartConfig()
      • propAsString

        protected java.lang.String propAsString​(java.util.Map<java.lang.String,​java.lang.Object> properties,
                                                java.lang.String propName)
      • getProtocol

        public Protocol getProtocol()
      • setProtocol

        public void setProtocol​(Protocol protocol)
      • getVdcs

        public java.util.List<com.emc.rest.smart.ecs.Vdc> getVdcs()
      • setVdcs

        public void setVdcs​(java.util.List<com.emc.rest.smart.ecs.Vdc> vdcs)
        Sets the VDC/host list
      • getHost

        public java.lang.String getHost()
      • setHost

        public void setHost​(java.lang.String host)
        Sets a single server host
      • getPort

        public int getPort()
      • setPort

        public void setPort​(int port)
        The data port to use for requests, if different from the default
      • isSmartClient

        public boolean isSmartClient()
      • getRootContext

        public java.lang.String getRootContext()
      • setRootContext

        public void setRootContext​(java.lang.String rootContext)
        The root context of the object API service, if different from the default
      • getNamespace

        public java.lang.String getNamespace()
      • setNamespace

        public void setNamespace​(java.lang.String namespace)
        The ECS namespace to use for the request
      • getIdentity

        public java.lang.String getIdentity()
      • setIdentity

        public void setIdentity​(java.lang.String identity)
        The ECS object user
      • getSecretKey

        public java.lang.String getSecretKey()
      • setSecretKey

        public void setSecretKey​(java.lang.String secretKey)
        The object user's secret key
      • getServerClockSkew

        public long getServerClockSkew()
      • setServerClockSkew

        public void setServerClockSkew​(long serverClockSkew)
        Set to adjust for client-server clock skew in milliseconds. A positive value means the client is *behind* the server; a negative value indicates it is *ahead of* the server
      • getUserAgent

        public java.lang.String getUserAgent()
      • setUserAgent

        public void setUserAgent​(java.lang.String userAgent)
        Sets a custom User-Agent string. Useful to track different applications through a load balancer or traffic manager
      • setEncryptionConfig

        public void setEncryptionConfig​(EncryptionConfig encryptionConfig)
        Deprecated.
        (2.0.3) this method does nothing. EncryptionConfig instance should be passed to the constructor of an encryption client
      • isGeoPinningEnabled

        public boolean isGeoPinningEnabled()
      • setGeoPinningEnabled

        public void setGeoPinningEnabled​(boolean geoPinningEnabled)
        Set to true to enable geo-pinning (hashes the object key and pins it to a specific VDC). Geo-pinning is used to balance requests across 3 or more VDCs while keeping read efficiency by reading from the primary copy. Disabled by default
      • isGeoReadRetryFailover

        public boolean isGeoReadRetryFailover()
      • setGeoReadRetryFailover

        public void setGeoReadRetryFailover​(boolean geoReadRetryFailover)
        Controls geo-pinning read retry fail-over. When enabled, if a read fails and is retried, it is sent to a different VDC than the last failed request (the next VDC in the list). Only applicable when geo-pinning is enabled. Disabled by default
      • getChunkedEncodingSize

        public int getChunkedEncodingSize()
      • setChunkedEncodingSize

        public void setChunkedEncodingSize​(int chunkedEncodingSize)
        If the parameter is not specified (0) then chunked encoding will not be used. A value < 0 declares that chunked encoding will be used with the default chunk size. A value > 0 declares that chunked encoding will be used with the value as the declared chunk size.
      • getConnectTimeout

        public int getConnectTimeout()
      • setConnectTimeout

        public void setConnectTimeout​(int connectTimeout)
      • getReadTimeout

        public int getReadTimeout()
      • setReadTimeout

        public void setReadTimeout​(int readTimeout)
      • getSessionToken

        public java.lang.String getSessionToken()
      • setSessionToken

        public void setSessionToken​(java.lang.String sessionToken)
      • getProperties

        public java.util.Map<java.lang.String,​java.lang.Object> getProperties()
      • getProperty

        public java.lang.Object getProperty​(java.lang.String propName)
      • getPropAsString

        public java.lang.String getPropAsString​(java.lang.String propName)
      • setProperty

        public void setProperty​(java.lang.String propName,
                                java.lang.Object value)
        Allows custom properties to be set. These will be passed on to other client components (i.e. Jersey ClientConfig)
      • withPort

        public T withPort​(int port)
      • withSmartClient

        public T withSmartClient​(boolean smartClient)
      • withRootContext

        public T withRootContext​(java.lang.String rootContext)
      • withNamespace

        public T withNamespace​(java.lang.String namespace)
      • withIdentity

        public T withIdentity​(java.lang.String identity)
      • withSecretKey

        public T withSecretKey​(java.lang.String secretKey)
      • withSessionToken

        public T withSessionToken​(java.lang.String sessionToken)
        Session token: You can use temporary security credentials provided by the STS to sign a request.
        Parameters:
        sessionToken - field from the STS response
        Returns:
      • withUserAgent

        public T withUserAgent​(java.lang.String userAgent)
      • withEncryptionConfig

        public T withEncryptionConfig​(EncryptionConfig encryptionConfig)
        Deprecated.
        (2.0.3) this method does nothing. EncryptionConfig instance should be passed to the constructor of an encryption client
      • withGeoPinningEnabled

        public T withGeoPinningEnabled​(boolean geoPinningEnabled)
      • withChunkedEncodingSize

        public T withChunkedEncodingSize​(int chunkedEncodingSize)
      • withConnectTimeout

        public T withConnectTimeout​(int connectTimeout)
      • withReadTimeout

        public T withReadTimeout​(int readTimeout)
      • withProperty

        public T withProperty​(java.lang.String propName,
                              java.lang.Object value)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object