public class FileSystemBlobStrategy extends Object implements BlobUploadStrategy, BlobDownloadStrategy
BlobUploadStrategy
and BlobDownloadStrategy
implementation which use the local filesystem for storing
the payloadConstructor 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 BlobUploadStrategy
javax.jms.JMSException
IOException
public URL uploadStream(ActiveMQBlobMessage message, InputStream in) throws javax.jms.JMSException, IOException
uploadStream
in interface BlobUploadStrategy
javax.jms.JMSException
IOException
public void deleteFile(ActiveMQBlobMessage message) throws IOException, javax.jms.JMSException
deleteFile
in interface BlobDownloadStrategy
IOException
javax.jms.JMSException
public InputStream getInputStream(ActiveMQBlobMessage message) throws IOException, javax.jms.JMSException
FileInputStream
for the give ActiveMQBlobMessage
getInputStream
in interface BlobDownloadStrategy
IOException
javax.jms.JMSException
protected File getFile(ActiveMQBlobMessage message) throws javax.jms.JMSException, IOException
File
for the ActiveMQBlobMessage
.message
- javax.jms.JMSException
IOException
Copyright © 2005–2018 FuseSource, Corp.. All rights reserved.