protected static class SWIFT_PING.SwiftClient
extends java.lang.Object
| 构造器和说明 |
|---|
SWIFT_PING.SwiftClient(com.fr.third.jgroups.protocols.SWIFT_PING.Authenticator authenticator)
Constructor
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
authenticate()
Authenticate
|
void |
createContainer(java.lang.String containerName)
Create a container, which is equivalent to a bucket
|
void |
createObject(java.lang.String containerName,
java.lang.String objectName,
byte[] contents)
Create an object (=file)
|
void |
deleteObject(java.lang.String containerName,
java.lang.String objectName)
Delete a object (=file) from the storage
|
java.util.List<java.lang.String> |
listObjects(java.lang.String containerName)
List files in a folder
|
byte[] |
readObject(java.lang.String containerName,
java.lang.String objectName)
Read the content of a file
|
public SWIFT_PING.SwiftClient(com.fr.third.jgroups.protocols.SWIFT_PING.Authenticator authenticator)
authenticator - Swift auth providerpublic void authenticate()
throws java.lang.Exception
java.lang.Exceptionpublic void deleteObject(java.lang.String containerName,
java.lang.String objectName)
throws java.lang.Exception
containerName - Folder nameobjectName - File namejava.io.IOExceptionjava.lang.Exceptionpublic void createContainer(java.lang.String containerName)
throws java.lang.Exception
containerName - Name of the containerjava.io.IOExceptionjava.lang.Exceptionpublic void createObject(java.lang.String containerName,
java.lang.String objectName,
byte[] contents)
throws java.lang.Exception
containerName - Name of the containerobjectName - Name of the filecontents - Binary content of the filejava.io.IOExceptionjava.lang.Exceptionpublic byte[] readObject(java.lang.String containerName,
java.lang.String objectName)
throws java.lang.Exception
containerName - Name of the folderobjectName - name of the filejava.io.IOExceptionjava.lang.Exceptionpublic java.util.List<java.lang.String> listObjects(java.lang.String containerName)
throws java.lang.Exception
containerName - Folder namejava.io.IOExceptionjava.lang.Exception