protected static class SWIFT_PING.SwiftClient
extends java.lang.Object
| Constructor and Description |
|---|
SwiftClient(org.jgroups.protocols.SWIFT_PING.Authenticator authenticator)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
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 SwiftClient(org.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.ExceptionCopyright © 1998-2020 Red Hat. All Rights Reserved.