|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jets3t.service.StorageService
org.jets3t.service.impl.rest.httpclient.RestStorageService
org.jets3t.service.S3Service
org.jets3t.service.impl.rest.httpclient.RestS3Service
public class RestS3Service
REST/HTTP implementation of an S3Service based on the HttpClient library.
This class uses properties obtained through Jets3tProperties
. For more information on
these properties please refer to
JetS3t Configuration
Field Summary |
---|
Fields inherited from class org.jets3t.service.StorageService |
---|
BUCKET_STATUS__ALREADY_CLAIMED, BUCKET_STATUS__DOES_NOT_EXIST, BUCKET_STATUS__MY_BUCKET |
Constructor Summary | |
---|---|
RestS3Service(ProviderCredentials credentials)
Constructs the service and initialises the properties. |
|
RestS3Service(ProviderCredentials credentials,
String invokingApplicationDescription,
org.apache.commons.httpclient.auth.CredentialsProvider credentialsProvider)
Constructs the service and initialises the properties. |
|
RestS3Service(ProviderCredentials credentials,
String invokingApplicationDescription,
org.apache.commons.httpclient.auth.CredentialsProvider credentialsProvider,
Jets3tProperties jets3tProperties)
Constructs the service and initialises the properties. |
|
RestS3Service(ProviderCredentials credentials,
String invokingApplicationDescription,
org.apache.commons.httpclient.auth.CredentialsProvider credentialsProvider,
Jets3tProperties jets3tProperties,
org.apache.commons.httpclient.HostConfiguration hostConfig)
Constructs the service and initialises the properties. |
Method Summary | |
---|---|
String |
getDevPayProductToken()
|
String |
getDevPayUserToken()
|
String |
getEndpoint()
|
List<String> |
getResourceParameterNames()
|
String |
getRestHeaderPrefix()
|
String |
getRestMetadataPrefix()
|
boolean |
isRequesterPaysEnabled()
Is this service configured to generate Requester Pays requests when uploading data to S3, or retrieving data from the service. |
void |
setDevPayProductToken(String productToken)
Set the Product Token value to use for requests to a DevPay S3 account. |
void |
setDevPayUserToken(String userToken)
Set the User Token value to use for requests to a DevPay S3 account. |
void |
setRequesterPaysEnabled(boolean isRequesterPays)
Instruct the service whether to generate Requester Pays requests when uploading data to S3, or retrieving data from the service. |
Methods inherited from class org.jets3t.service.impl.rest.httpclient.RestStorageService |
---|
authorizeHttpRequest, checkBucketStatus, deleteObjectWithSignedUrl, getCredentialsProvider, getHttpClient, getHttpConnectionManager, getObjectAclWithSignedUrl, getObjectDetailsWithSignedUrl, getObjectWithSignedUrl, isBucketAccessible, putObjectAclWithSignedUrl, putObjectWithSignedUrl, setCredentialsProvider, setHttpClient, setHttpConnectionManager |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.jets3t.service.utils.signedurl.SignedUrlHandler |
---|
deleteObjectWithSignedUrl, getObjectAclWithSignedUrl, getObjectDetailsWithSignedUrl, getObjectWithSignedUrl, putObjectAclWithSignedUrl, putObjectWithSignedUrl |
Constructor Detail |
---|
public RestS3Service(ProviderCredentials credentials) throws S3ServiceException
credentials
- the user credentials to use when communicating with S3, may be null in which case the
communication is done as an anonymous user.
S3ServiceException
public RestS3Service(ProviderCredentials credentials, String invokingApplicationDescription, org.apache.commons.httpclient.auth.CredentialsProvider credentialsProvider) throws S3ServiceException
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.
S3ServiceException
public RestS3Service(ProviderCredentials credentials, String invokingApplicationDescription, org.apache.commons.httpclient.auth.CredentialsProvider credentialsProvider, Jets3tProperties jets3tProperties) throws S3ServiceException
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.
S3ServiceException
public RestS3Service(ProviderCredentials credentials, String invokingApplicationDescription, org.apache.commons.httpclient.auth.CredentialsProvider credentialsProvider, Jets3tProperties jets3tProperties, org.apache.commons.httpclient.HostConfiguration hostConfig) throws S3ServiceException
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
S3ServiceException
Method Detail |
---|
public void setDevPayUserToken(String userToken)
userToken
- the user token value provided by the AWS DevPay activation service.public String getDevPayUserToken()
public void setDevPayProductToken(String productToken)
productToken
- the token that identifies your DevPay product.public String getDevPayProductToken()
public void setRequesterPaysEnabled(boolean isRequesterPays)
httpclient.requester-pays-buckets-enabled
.
isRequesterPays
- if true, all subsequent S3 service requests will include the Requester
Pays flag.public boolean isRequesterPaysEnabled()
httpclient.requester-pays-buckets-enabled
.
public String getEndpoint()
getEndpoint
in class StorageService
public String getRestHeaderPrefix()
getRestHeaderPrefix
in class StorageService
public List<String> getResourceParameterNames()
getResourceParameterNames
in class StorageService
public String getRestMetadataPrefix()
getRestMetadataPrefix
in class StorageService
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |