Class RestS3Service

    • Constructor Detail

      • RestS3Service

        public RestS3Service​(ProviderCredentials credentials)
                      throws S3ServiceException
        Constructs the service and initialises the properties.
        Parameters:
        credentials - the user credentials to use when communicating with S3, may be null in which case the communication is done as an anonymous user.
        Throws:
        S3ServiceException
      • RestS3Service

        public RestS3Service​(ProviderCredentials credentials,
                             String invokingApplicationDescription,
                             org.apache.commons.httpclient.auth.CredentialsProvider credentialsProvider)
                      throws S3ServiceException
        Constructs the service and initialises the properties.
        Parameters:
        credentials - the S3 user credentials to use when communicating with S3, may be null in which case the communication is done as an anonymous user.
        invokingApplicationDescription - a short description of the application using the service, suitable for inclusion in a user agent string for REST/HTTP requests. Ideally this would include the application's version number, for example: Cockpit/0.7.3 or My App Name/1.0
        credentialsProvider - an implementation of the HttpClient CredentialsProvider interface, to provide a means for prompting for credentials when necessary.
        Throws:
        S3ServiceException
      • RestS3Service

        public RestS3Service​(ProviderCredentials credentials,
                             String invokingApplicationDescription,
                             org.apache.commons.httpclient.auth.CredentialsProvider credentialsProvider,
                             Jets3tProperties jets3tProperties)
                      throws S3ServiceException
        Constructs the service and initialises the properties.
        Parameters:
        credentials - the S3 user credentials to use when communicating with S3, may be null in which case the communication is done as an anonymous user.
        invokingApplicationDescription - a short description of the application using the service, suitable for inclusion in a user agent string for REST/HTTP requests. Ideally this would include the application's version number, for example: Cockpit/0.7.3 or My App Name/1.0
        credentialsProvider - an implementation of the HttpClient CredentialsProvider interface, to provide a means for prompting for credentials when necessary.
        jets3tProperties - JetS3t properties that will be applied within this service.
        Throws:
        S3ServiceException
      • RestS3Service

        public RestS3Service​(ProviderCredentials credentials,
                             String invokingApplicationDescription,
                             org.apache.commons.httpclient.auth.CredentialsProvider credentialsProvider,
                             Jets3tProperties jets3tProperties,
                             org.apache.commons.httpclient.HostConfiguration hostConfig)
                      throws S3ServiceException
        Constructs the service and initialises the properties.
        Parameters:
        credentials - the S3 user credentials to use when communicating with S3, may be null in which case the communication is done as an anonymous user.
        invokingApplicationDescription - a short description of the application using the service, suitable for inclusion in a user agent string for REST/HTTP requests. Ideally this would include the application's version number, for example: Cockpit/0.7.3 or My App Name/1.0
        credentialsProvider - an implementation of the HttpClient CredentialsProvider interface, to provide a means for prompting for credentials when necessary.
        jets3tProperties - JetS3t properties that will be applied within this service.
        hostConfig - Custom HTTP host configuration; e.g to register a custom Protocol Socket Factory
        Throws:
        S3ServiceException
    • Method Detail

      • setDevPayUserToken

        public void setDevPayUserToken​(String userToken)
        Set the User Token value to use for requests to a DevPay S3 account. The user token is not required for DevPay web products for which the user token was created after 15th May 2008.
        Parameters:
        userToken - the user token value provided by the AWS DevPay activation service.
      • getDevPayUserToken

        public String getDevPayUserToken()
        Returns:
        the user token value to use in requests to a DevPay S3 account, or null if no such token value has been set.
      • setDevPayProductToken

        public void setDevPayProductToken​(String productToken)
        Set the Product Token value to use for requests to a DevPay S3 account.
        Parameters:
        productToken - the token that identifies your DevPay product.
      • getDevPayProductToken

        public String getDevPayProductToken()
        Returns:
        the product token value to use in requests to a DevPay S3 account, or null if no such token value has been set.
      • setRequesterPaysEnabled

        public void setRequesterPaysEnabled​(boolean isRequesterPays)
        Instruct the service whether to generate Requester Pays requests when uploading data to S3, or retrieving data from the service. The default value for the Requester Pays Enabled setting is set according to the jets3t.properties setting httpclient.requester-pays-buckets-enabled.
        Parameters:
        isRequesterPays - if true, all subsequent S3 service requests will include the Requester Pays flag.
      • isRequesterPaysEnabled

        public boolean isRequesterPaysEnabled()
        Is this service configured to generate Requester Pays requests when uploading data to S3, or retrieving data from the service. The default value for the Requester Pays Enabled setting is set according to the jets3t.properties setting httpclient.requester-pays-buckets-enabled.
        Returns:
        true if S3 service requests will include the Requester Pays flag, false otherwise.
      • getResourceParameterNames

        public List<String> getResourceParameterNames()
        Specified by:
        getResourceParameterNames in class StorageService
        Returns:
        GET parameter names that represent specific resources in the target service, as opposed to representing REST operation "plumbing". For example the "acl" parameter might be used to represent a resource's access control list settings.