org.apache.activemq.blob
Class DefaultBlobUploadStrategy

java.lang.Object
  extended by org.apache.activemq.blob.DefaultStrategy
      extended by org.apache.activemq.blob.DefaultBlobUploadStrategy
All Implemented Interfaces:
BlobUploadStrategy

public class DefaultBlobUploadStrategy
extends DefaultStrategy
implements BlobUploadStrategy

A default implementation of BlobUploadStrategy which uses the URL class to upload files or streams to a remote URL


Field Summary
 
Fields inherited from class org.apache.activemq.blob.DefaultStrategy
transferPolicy
 
Constructor Summary
DefaultBlobUploadStrategy(BlobTransferPolicy transferPolicy)
           
 
Method Summary
 java.net.URL uploadFile(ActiveMQBlobMessage message, java.io.File file)
           
 java.net.URL uploadStream(ActiveMQBlobMessage message, java.io.InputStream fis)
           
 
Methods inherited from class org.apache.activemq.blob.DefaultStrategy
createMessageURL, isSuccessfulCode
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultBlobUploadStrategy

public DefaultBlobUploadStrategy(BlobTransferPolicy transferPolicy)
Method Detail

uploadFile

public java.net.URL uploadFile(ActiveMQBlobMessage message,
                               java.io.File file)
                        throws javax.jms.JMSException,
                               java.io.IOException
Specified by:
uploadFile in interface BlobUploadStrategy
Throws:
javax.jms.JMSException
java.io.IOException

uploadStream

public java.net.URL uploadStream(ActiveMQBlobMessage message,
                                 java.io.InputStream fis)
                          throws javax.jms.JMSException,
                                 java.io.IOException
Specified by:
uploadStream in interface BlobUploadStrategy
Throws:
javax.jms.JMSException
java.io.IOException


Copyright © 2005-2011 FuseSource, Corp.. All Rights Reserved.