public class FileSystemBlobStrategy extends java.lang.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 java.io.File |
getFile(ActiveMQBlobMessage message)
Return the
File for the ActiveMQBlobMessage. |
java.io.InputStream |
getInputStream(ActiveMQBlobMessage message)
Returns a
FileInputStream for the give ActiveMQBlobMessage |
java.net.URL |
uploadFile(ActiveMQBlobMessage message,
java.io.File file) |
java.net.URL |
uploadStream(ActiveMQBlobMessage message,
java.io.InputStream in) |
public FileSystemBlobStrategy(BlobTransferPolicy policy) throws java.net.MalformedURLException, java.net.URISyntaxException
java.net.MalformedURLExceptionjava.net.URISyntaxExceptionprotected void createRootFolder()
throws java.net.MalformedURLException,
java.net.URISyntaxException
java.net.MalformedURLExceptionjava.net.URISyntaxExceptionpublic java.net.URL uploadFile(ActiveMQBlobMessage message, java.io.File file) throws javax.jms.JMSException, java.io.IOException
uploadFile in interface BlobUploadStrategyjavax.jms.JMSExceptionjava.io.IOExceptionpublic java.net.URL uploadStream(ActiveMQBlobMessage message, java.io.InputStream in) throws javax.jms.JMSException, java.io.IOException
uploadStream in interface BlobUploadStrategyjavax.jms.JMSExceptionjava.io.IOExceptionpublic void deleteFile(ActiveMQBlobMessage message) throws java.io.IOException, javax.jms.JMSException
deleteFile in interface BlobDownloadStrategyjava.io.IOExceptionjavax.jms.JMSExceptionpublic java.io.InputStream getInputStream(ActiveMQBlobMessage message) throws java.io.IOException, javax.jms.JMSException
FileInputStream for the give ActiveMQBlobMessagegetInputStream in interface BlobDownloadStrategyjava.io.IOExceptionjavax.jms.JMSExceptionprotected java.io.File getFile(ActiveMQBlobMessage message) throws javax.jms.JMSException, java.io.IOException
File for the ActiveMQBlobMessage.message - javax.jms.JMSExceptionjava.io.IOExceptionCopyright © 2005-2013 Red Hat, Inc.. All Rights Reserved.