/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQBlobMessage(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQBlobMessage(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQBlobMessage(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQBlobMessage(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQBlobMessage(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQBlobMessage(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQBlobMessage(); }
public Message copy() { ActiveMQBlobMessage copy = new ActiveMQBlobMessage(); copy(copy); return copy; }
/** * Creates an initialized <CODE>BlobMessage</CODE> object. A * <CODE>BlobMessage</CODE> object is used to send a message containing a * <CODE>URL</CODE> which points to some network addressible BLOB. * * @param url the network addressable URL used to pass directly to the * consumer * @param deletedByBroker indicates whether or not the resource is deleted * by the broker when the message is acknowledged * @return a BlobMessage * @throws JMSException if the JMS provider fails to create this message due * to some internal error. */ public BlobMessage createBlobMessage(URL url, boolean deletedByBroker) throws JMSException { ActiveMQBlobMessage message = new ActiveMQBlobMessage(); configureMessage(message); message.setURL(url); message.setDeletedByBroker(deletedByBroker); message.setBlobDownloader(new BlobDownloader(getBlobTransferPolicy())); return message; }
/** * Creates an initialized <CODE>BlobMessage</CODE> object. A * <CODE>BlobMessage</CODE> object is used to send a message containing * the <CODE>File</CODE> content. Before the message is sent the file * conent will be uploaded to the broker or some other remote repository * depending on the {@link #getBlobTransferPolicy()}. * * @param file the file to be uploaded to some remote repo (or the broker) * depending on the strategy * @return a BlobMessage * @throws JMSException if the JMS provider fails to create this message due * to some internal error. */ public BlobMessage createBlobMessage(File file) throws JMSException { ActiveMQBlobMessage message = new ActiveMQBlobMessage(); configureMessage(message); message.setBlobUploader(new BlobUploader(getBlobTransferPolicy(), file)); message.setBlobDownloader(new BlobDownloader((getBlobTransferPolicy()))); message.setDeletedByBroker(true); message.setName(file.getName()); return message; }
/** * Creates an initialized <CODE>BlobMessage</CODE> object. A * <CODE>BlobMessage</CODE> object is used to send a message containing * the <CODE>File</CODE> content. Before the message is sent the file * conent will be uploaded to the broker or some other remote repository * depending on the {@link #getBlobTransferPolicy()}. <br/> * <p> * The caller of this method is responsible for closing the * input stream that is used, however the stream can not be closed * until <b>after</b> the message has been sent. To have this class * manage the stream and close it automatically, use the method * {@link ActiveMQSession#createBlobMessage(File)} * * @param in the stream to be uploaded to some remote repo (or the broker) * depending on the strategy * @return a BlobMessage * @throws JMSException if the JMS provider fails to create this message due * to some internal error. */ public BlobMessage createBlobMessage(InputStream in) throws JMSException { ActiveMQBlobMessage message = new ActiveMQBlobMessage(); configureMessage(message); message.setBlobUploader(new BlobUploader(getBlobTransferPolicy(), in)); message.setBlobDownloader(new BlobDownloader(getBlobTransferPolicy())); message.setDeletedByBroker(true); return message; }
} else if (message instanceof BlobMessage) { BlobMessage blobMessage = (BlobMessage)message; ActiveMQBlobMessage msg = new ActiveMQBlobMessage(); msg.setConnection(connection); if (connection != null){
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQBlobMessage(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQBlobMessage(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQBlobMessage(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQBlobMessage(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQBlobMessage(); }
/** * @return a new object instance */ public DataStructure createObject() { return new ActiveMQBlobMessage(); }
public Message copy() { ActiveMQBlobMessage copy = new ActiveMQBlobMessage(); copy(copy); return copy; }
public Message copy() { ActiveMQBlobMessage copy = new ActiveMQBlobMessage(); copy(copy); return copy; }