|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jets3t.service.S3Service
org.jets3t.service.impl.soap.axis.SoapS3Service
public class SoapS3Service
SOAP implementation of an S3Service based on the Apache Axis 1.4 library.
Note: This SOAP implementation does not support IO streaming uploads to S3. Any documents uploaded by this implementation must fit inside memory allocated to the Java program running this class if OutOfMemory errors are to be avoided.
Note 2: The SOAP implementation does not perform retries when communication with s3 fails.
The preferred S3Service implementation in JetS3t is
RestS3Service
. This SOAP
implementation class is provided with JetS3t as a proof-of-concept, showing that alternative
service implementations are possible and what a SOAP service might look like. We do not
recommend that this service be used to perform any real work.
Field Summary |
---|
Fields inherited from class org.jets3t.service.S3Service |
---|
BUCKET_STATUS__ALREADY_CLAIMED, BUCKET_STATUS__DOES_NOT_EXIST, BUCKET_STATUS__MY_BUCKET, VERSION_NO__JETS3T_TOOLKIT |
Constructor Summary | |
---|---|
SoapS3Service(AWSCredentials awsCredentials)
Deprecated. Constructs the SOAP service implementation and, based on the value of S3Service.isHttpsOnly
sets the SOAP endpoint to use HTTP or HTTPS protocols. |
|
SoapS3Service(AWSCredentials awsCredentials,
String invokingApplicationDescription)
Deprecated. Constructs the SOAP service implementation and, based on the value of S3Service.isHttpsOnly
sets the SOAP endpoint to use HTTP or HTTPS protocols. |
|
SoapS3Service(AWSCredentials awsCredentials,
String invokingApplicationDescription,
Jets3tProperties jets3tProperties)
Deprecated. Constructs the SOAP service implementation and, based on the value of S3Service.isHttpsOnly
sets the SOAP endpoint to use HTTP or HTTPS protocols. |
Method Summary | |
---|---|
int |
checkBucketStatus(String bucketName)
Deprecated. Find out the status of an S3 bucket with the given name. |
boolean |
isBucketAccessible(String bucketName)
Deprecated. Indicates whether a bucket exists and is accessible to a service user. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SoapS3Service(AWSCredentials awsCredentials, String invokingApplicationDescription, Jets3tProperties jets3tProperties) throws S3ServiceException
S3Service.isHttpsOnly
sets the SOAP endpoint to use HTTP or HTTPS protocols.
awsCredentials
- 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
jets3tProperties
- JetS3t properties that will be applied within this service.
S3ServiceException
public SoapS3Service(AWSCredentials awsCredentials, String invokingApplicationDescription) throws S3ServiceException
S3Service.isHttpsOnly
sets the SOAP endpoint to use HTTP or HTTPS protocols.
awsCredentials
- 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
S3ServiceException
public SoapS3Service(AWSCredentials awsCredentials) throws S3ServiceException
S3Service.isHttpsOnly
sets the SOAP endpoint to use HTTP or HTTPS protocols.
awsCredentials
-
S3ServiceException
Method Detail |
---|
public boolean isBucketAccessible(String bucketName) throws S3ServiceException
S3Service
S3Service.getOrCreateBucket(String)
method instead.
This method can be performed by anonymous services.
Implementation notes
This method can be implemented by attempting to list the objects in a bucket. If the listing is successful return true, if the listing failed for any reason return false.
isBucketAccessible
in class S3Service
S3ServiceException
public int checkBucketStatus(String bucketName) throws S3ServiceException
S3Service
RestS3Service
client.
Warning! S3 can act strangely when you use this method in some circumstances. If you check the status of a bucket and find that it does not exist, then create the bucket, S3 will continue to tell you the bucket does not exists for up to 30 seconds. This problem has something to do with connection caching (I think).
This S3 quirk makes it a bad idea to use this method to check for a bucket's
existence before creating that bucket. Use the S3Service.getOrCreateBucket(String)
method for this purpose instead.
checkBucketStatus
in class S3Service
S3Service.BUCKET_STATUS__MY_BUCKET
if you already own the bucket,
S3Service.BUCKET_STATUS__DOES_NOT_EXIST
if the bucket does not yet exist
in S3, or S3Service.BUCKET_STATUS__ALREADY_CLAIMED
if someone else has
already created a bucket with the given name.
S3ServiceException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |