org.apache.activemq.blob
public class FileSystemBlobStrategy extends java.lang.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 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.MalformedURLException
java.net.URISyntaxException
protected void createRootFolder() throws java.net.MalformedURLException, java.net.URISyntaxException
java.net.MalformedURLException
java.net.URISyntaxException
public java.net.URL uploadFile(ActiveMQBlobMessage message, java.io.File file) throws javax.jms.JMSException, java.io.IOException
uploadFile
in interface BlobUploadStrategy
javax.jms.JMSException
java.io.IOException
public java.net.URL uploadStream(ActiveMQBlobMessage message, java.io.InputStream in) throws javax.jms.JMSException, java.io.IOException
uploadStream
in interface BlobUploadStrategy
javax.jms.JMSException
java.io.IOException
public void deleteFile(ActiveMQBlobMessage message) throws java.io.IOException, javax.jms.JMSException
deleteFile
in interface BlobDownloadStrategy
java.io.IOException
javax.jms.JMSException
public java.io.InputStream getInputStream(ActiveMQBlobMessage message) throws java.io.IOException, javax.jms.JMSException
FileInputStream
for the give ActiveMQBlobMessage
getInputStream
in interface BlobDownloadStrategy
java.io.IOException
javax.jms.JMSException
protected java.io.File getFile(ActiveMQBlobMessage message) throws javax.jms.JMSException, java.io.IOException
File
for the ActiveMQBlobMessage
.message
- javax.jms.JMSException
java.io.IOException
Copyright © 2005-2014. All Rights Reserved.