Package org.teiid.s3
Class S3Connection
- java.lang.Object
-
- org.teiid.s3.S3Connection
-
- All Implemented Interfaces:
VirtualFileConnection
,Connection
public class S3Connection extends Object implements VirtualFileConnection
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.teiid.file.VirtualFileConnection
VirtualFileConnection.FileMetadata, VirtualFileConnection.Util
-
-
Constructor Summary
Constructors Constructor Description S3Connection(S3Configuration s3Config, com.amazonaws.services.s3.AmazonS3 s3Client)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(InputStream in, String path)
Add a filevoid
add(InputStream inputStream, String s, VirtualFileConnection.FileMetadata fileMetadata)
Add a filevoid
close()
VirtualFile[]
getFiles(String s)
Return a list of files by a given file patternprotected boolean
matchString(String key, String pattern)
boolean
remove(String s)
Remove a file-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.teiid.file.VirtualFileConnection
areFilesUsableAfterClose
-
-
-
-
Constructor Detail
-
S3Connection
public S3Connection(S3Configuration s3Config, com.amazonaws.services.s3.AmazonS3 s3Client)
-
-
Method Detail
-
getFiles
public VirtualFile[] getFiles(String s) throws TranslatorException
Description copied from interface:VirtualFileConnection
Return a list of files by a given file pattern- Specified by:
getFiles
in interfaceVirtualFileConnection
- Parameters:
s
- - the syntax and pattern. The wildcard character * is supported in the filename only.- Returns:
- Throws:
TranslatorException
-
add
public void add(InputStream in, String path) throws TranslatorException
Description copied from interface:VirtualFileConnection
Add a file- Specified by:
add
in interfaceVirtualFileConnection
- Throws:
TranslatorException
-
add
public void add(InputStream inputStream, String s, VirtualFileConnection.FileMetadata fileMetadata) throws TranslatorException
Description copied from interface:VirtualFileConnection
Add a file- Specified by:
add
in interfaceVirtualFileConnection
fileMetadata
- Additional metadata about the file to be created. May not be used/supported by all file sources.- Throws:
TranslatorException
-
remove
public boolean remove(String s) throws TranslatorException
Description copied from interface:VirtualFileConnection
Remove a file- Specified by:
remove
in interfaceVirtualFileConnection
- Returns:
- Throws:
TranslatorException
-
close
public void close()
- Specified by:
close
in interfaceConnection
-
-