Package org.jgroups.protocols
Class SWIFT_PING.SwiftClient
java.lang.Object
org.jgroups.protocols.SWIFT_PING.SwiftClient
- Enclosing class:
SWIFT_PING
A thread safe Swift client
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SWIFT_PING.Authenticatorprivate SWIFT_PING.Credentialsprivate final Log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAuthenticatevoidcreateContainer(String containerName) Create a container, which is equivalent to a bucketvoidcreateObject(String containerName, String objectName, byte[] contents) Create an object (=file)voiddeleteObject(String containerName, String objectName) Delete a object (=file) from the storageprivate SWIFT_PING.ConnBuildergetConnBuilder(String container, String object) listObjects(String containerName) List files in a folderbyte[]readObject(String containerName, String objectName) Read the content of a file
-
Field Details
-
authenticator
-
credentials
-
log
-
-
Constructor Details
-
SwiftClient
Constructor- Parameters:
authenticator- Swift auth provider
-
-
Method Details
-
authenticate
Authenticate- Throws:
Exception
-
deleteObject
Delete a object (=file) from the storage- Parameters:
containerName- Folder nameobjectName- File name- Throws:
IOExceptionException
-
createContainer
Create a container, which is equivalent to a bucket- Parameters:
containerName- Name of the container- Throws:
IOExceptionException
-
createObject
Create an object (=file)- Parameters:
containerName- Name of the containerobjectName- Name of the filecontents- Binary content of the file- Throws:
IOExceptionException
-
readObject
Read the content of a file- Parameters:
containerName- Name of the folderobjectName- name of the file- Returns:
- Content of the files
- Throws:
IOExceptionException
-
listObjects
List files in a folder- Parameters:
containerName- Folder name- Returns:
- List of file names
- Throws:
IOExceptionException
-
getConnBuilder
- Throws:
IOException
-