public class S3Service extends StorageServiceBase<org.osgl.storage.impl.S3Obj> implements IStorageService
Implement IStorageService on Amazon S3
| Modifier and Type | Class and Description |
|---|---|
static class |
S3Service.StorageClass |
IStorageService.f| Modifier and Type | Field and Description |
|---|---|
static String |
ATTR_STORAGE_CLASS |
static String |
CONF_BUCKET |
static String |
CONF_CONN_TIMEOUT |
static String |
CONF_DEF_STORAGE_CLASS |
static String |
CONF_KEY_ID |
static String |
CONF_KEY_SECRET |
static String |
CONF_MAX_CONN |
static String |
CONF_MAX_ERROR_RETRY |
static String |
CONF_S3_GET_META_ONLY
Deprecated.
|
static String |
CONF_S3_GET_NO_GET
Deprecated.
|
static String |
CONF_S3_STATIC_WEB_ENDPOINT
Deprecated.
|
static String |
CONF_SOCKET_TIMEOUT |
static String |
CONF_TCP_KEEP_ALIVE |
static com.amazonaws.services.s3.AmazonS3 |
s3 |
conf, CONF_GET_META_ONLY, CONF_GET_NO_GET, CONF_KEY_NAME_PROVIDER, CONF_STATIC_WEB_ENDPOINT, CONF_STORE_SUFFIX, contextPath, keygen, logger, subFoldersCONF_CONTEXT_PATH, CONF_ID, CONF_KEY_GEN, DEFAULT, VERSION| Modifier and Type | Method and Description |
|---|---|
protected void |
configure(Map<String,String> conf) |
protected InputStream |
doGetInputStream(String fullPath)
Returns the input stream from fullPath specified.
|
protected Map<String,String> |
doGetMeta(String fullPath)
Returns the meta attributes from fullPath specified.
|
protected void |
doPut(String fullPath,
ISObject stuff,
Map<String,String> attrs)
Put the storage object specified by fullPath into the storage service.
|
protected void |
doRemove(String fullPath)
Remove the storage object specified by fullPath.
|
protected StorageServiceBase |
newService(Map conf) |
protected ISObject |
newSObject(String key) |
configure, contextPath, createSubFolder, forceGet, get, getConfValue, getContextPath, getFull, getKey, getKey, getLazy, getMeta, getMeta, getStaticWebEndpoint, getUrl, id, isManaged, keyWithContextPath, loadContent, put, remove, setKeyGenerator, setKeyNameProvider, subFolderclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcontextPath, forceGet, get, getContextPath, getFull, getKey, getKey, getLazy, getStaticWebEndpoint, getUrl, id, isManaged, loadContent, put, remove, subFolderpublic static final String CONF_KEY_ID
public static final String CONF_KEY_SECRET
public static final String CONF_DEF_STORAGE_CLASS
public static final String CONF_BUCKET
public static final String CONF_MAX_ERROR_RETRY
public static final String CONF_CONN_TIMEOUT
public static final String CONF_SOCKET_TIMEOUT
public static final String CONF_TCP_KEEP_ALIVE
public static final String CONF_MAX_CONN
@Deprecated public static final String CONF_S3_GET_NO_GET
This configuration item is deprecated and might be removed from future versions.
Please use StorageServiceBase.CONF_GET_NO_GET instead
@Deprecated public static final String CONF_S3_GET_META_ONLY
This configuration item is deprecated and might be removed from future versions.
Please use StorageServiceBase.CONF_GET_META_ONLY instead
@Deprecated public static final String CONF_S3_STATIC_WEB_ENDPOINT
This configuration item is deprecated and might be removed from future versions.
Please use StorageServiceBase.CONF_STATIC_WEB_ENDPOINT instead
public static final String ATTR_STORAGE_CLASS
public static com.amazonaws.services.s3.AmazonS3 s3
protected void configure(Map<String,String> conf)
configure in class StorageServiceBase<org.osgl.storage.impl.S3Obj>protected void doRemove(String fullPath)
StorageServiceBaseRemove the storage object specified by fullPath. The fullPath is composed of * StorageServiceBase.contextPath() * ISObject.getKey()
doRemove in class StorageServiceBase<org.osgl.storage.impl.S3Obj>fullPath - the full path to locate the storage objectprotected ISObject newSObject(String key)
newSObject in class StorageServiceBase<org.osgl.storage.impl.S3Obj>protected Map<String,String> doGetMeta(String fullPath)
StorageServiceBaseReturns the meta attributes from fullPath specified. The fullPath is composed of * StorageServiceBase.contextPath() * ISObject.getKey()
doGetMeta in class StorageServiceBase<org.osgl.storage.impl.S3Obj>fullPath - the full path to locate the storage objectprotected InputStream doGetInputStream(String fullPath)
StorageServiceBaseReturns the input stream from fullPath specified. The fullPath is composed of * StorageServiceBase.contextPath() * ISObject.getKey()
doGetInputStream in class StorageServiceBase<org.osgl.storage.impl.S3Obj>fullPath - the full path to locate the storage objectprotected void doPut(String fullPath, ISObject stuff, Map<String,String> attrs)
StorageServiceBasePut the storage object specified by fullPath into the storage service. The fullPath is composed of * StorageServiceBase.contextPath() * ISObject.getKey()
doPut in class StorageServiceBase<org.osgl.storage.impl.S3Obj>fullPath - the full path to locate the storage objectattrs - the meta attributes of the storage objectprotected StorageServiceBase newService(Map conf)
newService in class StorageServiceBase<org.osgl.storage.impl.S3Obj>Copyright © 2013–2017 OSGL (Open Source General Library). All rights reserved.