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 JMSException, IOException
uploadFile
in interface BlobUploadStrategy
JMSException
IOException
public URL uploadStream(ActiveMQBlobMessage message, InputStream in) throws JMSException, IOException
uploadStream
in interface BlobUploadStrategy
JMSException
IOException
public void deleteFile(ActiveMQBlobMessage message) throws IOException, JMSException
deleteFile
in interface BlobDownloadStrategy
IOException
JMSException
public InputStream getInputStream(ActiveMQBlobMessage message) throws IOException, JMSException
FileInputStream
for the give ActiveMQBlobMessage
getInputStream
in interface BlobDownloadStrategy
IOException
JMSException
protected File getFile(ActiveMQBlobMessage message) throws JMSException, IOException
File
for the ActiveMQBlobMessage
.message
- JMSException
IOException
Copyright © 2005–2016 The Apache Software Foundation. All rights reserved.