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 javax.jms.JMSException, IOException
uploadFile in interface BlobUploadStrategyjavax.jms.JMSExceptionIOExceptionpublic URL uploadStream(ActiveMQBlobMessage message, InputStream in) throws javax.jms.JMSException, IOException
uploadStream in interface BlobUploadStrategyjavax.jms.JMSExceptionIOExceptionpublic void deleteFile(ActiveMQBlobMessage message) throws IOException, javax.jms.JMSException
deleteFile in interface BlobDownloadStrategyIOExceptionjavax.jms.JMSExceptionpublic InputStream getInputStream(ActiveMQBlobMessage message) throws IOException, javax.jms.JMSException
FileInputStream for the give ActiveMQBlobMessagegetInputStream in interface BlobDownloadStrategyIOExceptionjavax.jms.JMSExceptionprotected File getFile(ActiveMQBlobMessage message) throws javax.jms.JMSException, IOException
File for the ActiveMQBlobMessage.message - javax.jms.JMSExceptionIOExceptionCopyright © 2005–2020 The Apache Software Foundation. All rights reserved.