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.Exception
public void deleteObject(java.lang.String containerName, java.lang.String objectName) throws java.lang.Exception
containerName
- Folder nameobjectName
- File namejava.io.IOException
java.lang.Exception
public void createContainer(java.lang.String containerName) throws java.lang.Exception
containerName
- Name of the containerjava.io.IOException
java.lang.Exception
public 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.IOException
java.lang.Exception
public byte[] readObject(java.lang.String containerName, java.lang.String objectName) throws java.lang.Exception
containerName
- Name of the folderobjectName
- name of the filejava.io.IOException
java.lang.Exception
public java.util.List<java.lang.String> listObjects(java.lang.String containerName) throws java.lang.Exception
containerName
- Folder namejava.io.IOException
java.lang.Exception
Copyright © 1998-2020 Red Hat. All Rights Reserved.