public class FileSystemBlobStrategy extends Object implements BlobUploadStrategy, BlobDownloadStrategy
BlobUploadStrategy and BlobDownloadStrategy implementation which use the local filesystem for storing
the payload| Constructor and Description |
|---|
FileSystemBlobStrategy(BlobTransferPolicy policy) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
createRootFolder()
Create the root folder if not exist
|
void |
deleteFile(ActiveMQBlobMessage message) |
protected File |
getFile(ActiveMQBlobMessage message)
Return the
File for the ActiveMQBlobMessage. |
InputStream |
getInputStream(ActiveMQBlobMessage message)
Returns a
FileInputStream for the give ActiveMQBlobMessage |
URL |
uploadFile(ActiveMQBlobMessage message,
File file) |
URL |
uploadStream(ActiveMQBlobMessage message,
InputStream in) |
public FileSystemBlobStrategy(BlobTransferPolicy policy) throws MalformedURLException, URISyntaxException
protected void createRootFolder() throws MalformedURLException, URISyntaxException
public URL uploadFile(ActiveMQBlobMessage message, File file) throws JMSException, IOException
uploadFile in interface BlobUploadStrategyJMSExceptionIOExceptionpublic URL uploadStream(ActiveMQBlobMessage message, InputStream in) throws JMSException, IOException
uploadStream in interface BlobUploadStrategyJMSExceptionIOExceptionpublic void deleteFile(ActiveMQBlobMessage message) throws IOException, JMSException
deleteFile in interface BlobDownloadStrategyIOExceptionJMSExceptionpublic InputStream getInputStream(ActiveMQBlobMessage message) throws IOException, JMSException
FileInputStream for the give ActiveMQBlobMessagegetInputStream in interface BlobDownloadStrategyIOExceptionJMSExceptionprotected File getFile(ActiveMQBlobMessage message) throws JMSException, IOException
File for the ActiveMQBlobMessage.message - JMSExceptionIOExceptionCopyright © 2005–2015 FuseSource, Corp.. All rights reserved.