public class FileSystemBlobStrategy extends Object implements org.apache.activemq.blob.BlobUploadStrategy, org.apache.activemq.blob.BlobDownloadStrategy, ActiveMQSupport
BlobUploadStrategy
and BlobDownloadStrategy
implementation
which use the FileSystem
to lookup the File
for the
BlobMessage
JAMES_BLOB_URL, JAMES_QUEUE_NAME, JAMES_REUSE_BLOB_URL
JAMES_MAIL_ATTRIBUTE_NAMES, JAMES_MAIL_ERROR_MESSAGE, JAMES_MAIL_LAST_UPDATED, JAMES_MAIL_MESSAGE_SIZE, JAMES_MAIL_NAME, JAMES_MAIL_RECIPIENTS, JAMES_MAIL_REMOTEADDR, JAMES_MAIL_REMOTEHOST, JAMES_MAIL_SENDER, JAMES_MAIL_SEPARATOR, JAMES_MAIL_STATE, JAMES_NEXT_DELIVERY
Constructor and Description |
---|
FileSystemBlobStrategy(org.apache.activemq.blob.BlobTransferPolicy policy,
FileSystem fs,
int splitCount) |
Modifier and Type | Method and Description |
---|---|
void |
deleteFile(org.apache.activemq.command.ActiveMQBlobMessage message) |
protected File |
getFile(org.apache.activemq.command.ActiveMQBlobMessage message)
Return the
File for the ActiveMQBlobMessage . |
InputStream |
getInputStream(org.apache.activemq.command.ActiveMQBlobMessage message)
Returns a
FileInputStream for the give BlobMessage |
URL |
uploadFile(org.apache.activemq.command.ActiveMQBlobMessage message,
File file) |
URL |
uploadStream(org.apache.activemq.command.ActiveMQBlobMessage message,
InputStream in) |
public FileSystemBlobStrategy(org.apache.activemq.blob.BlobTransferPolicy policy, FileSystem fs, int splitCount)
public URL uploadFile(org.apache.activemq.command.ActiveMQBlobMessage message, File file) throws javax.jms.JMSException, IOException
uploadFile
in interface org.apache.activemq.blob.BlobUploadStrategy
javax.jms.JMSException
IOException
BlobUploadStrategy.uploadFile(org.apache.activemq.command.ActiveMQBlobMessage,
java.io.File)
public URL uploadStream(org.apache.activemq.command.ActiveMQBlobMessage message, InputStream in) throws javax.jms.JMSException, IOException
uploadStream
in interface org.apache.activemq.blob.BlobUploadStrategy
javax.jms.JMSException
IOException
BlobUploadStrategy.uploadStream(org.apache.activemq.command.ActiveMQBlobMessage,
java.io.InputStream)
public void deleteFile(org.apache.activemq.command.ActiveMQBlobMessage message) throws IOException, javax.jms.JMSException
deleteFile
in interface org.apache.activemq.blob.BlobDownloadStrategy
IOException
javax.jms.JMSException
BlobDownloadStrategy.deleteFile(org.apache.activemq.command.ActiveMQBlobMessage)
public InputStream getInputStream(org.apache.activemq.command.ActiveMQBlobMessage message) throws IOException, javax.jms.JMSException
FileInputStream
for the give BlobMessage
getInputStream
in interface org.apache.activemq.blob.BlobDownloadStrategy
IOException
javax.jms.JMSException
protected File getFile(org.apache.activemq.command.ActiveMQBlobMessage message) throws javax.jms.JMSException, IOException
message
- javax.jms.JMSException
FileNotFoundException
IOException
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.