Package org.apache.activemq.command
Class ActiveMQBlobMessage
- java.lang.Object
-
- org.apache.activemq.command.BaseCommand
-
- org.apache.activemq.command.Message
-
- org.apache.activemq.command.ActiveMQMessage
-
- org.apache.activemq.command.ActiveMQBlobMessage
-
- All Implemented Interfaces:
Message,BlobMessage,MessageReference,Command,DataStructure,MarshallAware,Message,ScheduledMessage
public class ActiveMQBlobMessage extends ActiveMQMessage implements BlobMessage
An implementation ofBlobMessagefor out of band BLOB transfer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.activemq.command.Message
Message.MessageDestination
-
-
Field Summary
Fields Modifier and Type Field Description static StringBINARY_MIME_TYPEstatic byteDATA_STRUCTURE_TYPE-
Fields inherited from class org.apache.activemq.command.ActiveMQMessage
acknowledgeCallback, BROKER_PATH_PROPERTY, DLQ_DELIVERY_FAILURE_CAUSE_PROPERTY
-
Fields inherited from class org.apache.activemq.command.Message
arrival, brokerInTime, brokerOutTime, compressed, content, correlationId, dataStructure, DEFAULT_MINIMUM_MESSAGE_SIZE, destination, droppable, expiration, groupID, groupSequence, jmsXGroupFirstForConsumer, marshalledProperties, messageId, ORIGINAL_EXPIRATION, originalDestination, originalTransactionId, persistent, priority, producerId, properties, readOnlyBody, readOnlyProperties, recievedByDFBridge, redeliveryCounter, replyTo, size, targetConsumerId, timestamp, transactionId, type, userID
-
Fields inherited from class org.apache.activemq.command.BaseCommand
commandId, responseRequired
-
Fields inherited from interface javax.jms.Message
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE
-
Fields inherited from interface org.apache.activemq.ScheduledMessage
AMQ_SCHEDULED_CRON, AMQ_SCHEDULED_DELAY, AMQ_SCHEDULED_ID, AMQ_SCHEDULED_PERIOD, AMQ_SCHEDULED_REPEAT, AMQ_SCHEDULER_ACTION, AMQ_SCHEDULER_ACTION_BROWSE, AMQ_SCHEDULER_ACTION_END_TIME, AMQ_SCHEDULER_ACTION_REMOVE, AMQ_SCHEDULER_ACTION_REMOVEALL, AMQ_SCHEDULER_ACTION_START_TIME, AMQ_SCHEDULER_MANAGEMENT_DESTINATION
-
-
Constructor Summary
Constructors Constructor Description ActiveMQBlobMessage()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Messagecopy()voiddeleteFile()BlobDownloadergetBlobDownloader()BlobUploadergetBlobUploader()bytegetDataStructureType()InputStreamgetInputStream()Return the input stream to process the BLOBStringgetJMSXMimeType()Returns the MIME type of this mesage.StringgetMimeType()The MIME type of the BLOB which can be used to apply different content types to messages.StringgetName()StringgetRemoteBlobUrl()URLgetURL()Returns the URL for the blob if its available as an external URL (such as file, http, ftp etc) or null if there is no URL availablebooleanisDeletedByBroker()voidonSend()Send operation event listener.voidsetBlobDownloader(BlobDownloader blobDownloader)voidsetBlobUploader(BlobUploader blobUploader)voidsetDeletedByBroker(boolean deletedByBroker)voidsetMimeType(String mimeType)Sets the MIME type of the BLOB so that a consumer can process things nicely with a Java Activation Framework DataHandlervoidsetName(String name)The name of the attachment which can be useful information if transmitting files over ActiveMQvoidsetRemoteBlobUrl(String remoteBlobUrl)voidsetURL(URL url)-
Methods inherited from class org.apache.activemq.command.ActiveMQMessage
acknowledge, checkReadOnlyBody, checkReadOnlyProperties, checkValidObject, clearBody, clearProperties, convertScheduled, copy, decodeString, encodeString, equals, getAcknowledgeCallback, getAllPropertyNames, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, hashCode, isContentMarshalled, propertyExists, setAcknowledgeCallback, setBooleanProperty, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setObjectProperty, setProperties, setShortProperty, setStringProperty, storeContent, storeContentAndClear, visit
-
Methods inherited from class org.apache.activemq.command.Message
afterMarshall, afterUnmarshall, beforeMarshall, beforeUnmarshall, canProcessAsExpired, clearUnMarshalledState, compress, copy, decrementReferenceCount, doCompress, getArrival, getBrokerInTime, getBrokerOutTime, getBrokerPath, getCluster, getConnection, getContent, getCorrelationId, getDataStructure, getDestination, getExpiration, getGroupID, getGroupSequence, getMarshalledProperties, getMemoryUsage, getMessage, getMessageHardRef, getMessageId, getMinimumMessageSize, getOriginalDestination, getOriginalTransactionId, getPriority, getProducerId, getProperties, getProperty, getRedeliveryCounter, getReferenceCount, getRegionDestination, getReplyTo, getSize, getTargetConsumerId, getTimestamp, getTransactionId, getType, getUserID, incrementRedeliveryCounter, incrementReferenceCount, isAdvisory, isCompressed, isDroppable, isDropped, isExpired, isInTransaction, isJMSXGroupFirstForConsumer, isMarshallAware, isMarshalled, isMessage, isPersistent, isPropertiesMarshalled, isReadOnlyBody, isReadOnlyProperties, isRecievedByDFBridge, isRedelivered, lazyCreateProperties, onMessageRolledBack, removeProperty, setArrival, setBrokerInTime, setBrokerOutTime, setBrokerPath, setCluster, setCompressed, setConnection, setContent, setCorrelationId, setDataStructure, setDestination, setDroppable, setExpiration, setGroupID, setGroupSequence, setJMSXGroupFirstForConsumer, setMarshalledProperties, setMemoryUsage, setMessageId, setOriginalDestination, setOriginalTransactionId, setPersistent, setPriority, setProducerId, setProperty, setReadOnlyBody, setReadOnlyProperties, setRecievedByDFBridge, setRedelivered, setRedeliveryCounter, setRegionDestination, setReplyTo, setTargetConsumerId, setTimestamp, setTransactionId, setType, setUserID, toString, toString
-
Methods inherited from class org.apache.activemq.command.BaseCommand
copy, getCommandId, getFrom, getTo, isBrokerInfo, isConnectionControl, isConsumerControl, isMessageAck, isMessageDispatch, isMessageDispatchNotification, isResponse, isResponseRequired, isShutdownInfo, isWireFormatInfo, setCommandId, setFrom, setResponseRequired, setTo
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.jms.Message
acknowledge, clearBody, clearProperties, getBooleanProperty, getByteProperty, getDoubleProperty, getFloatProperty, getIntProperty, getJMSCorrelationID, getJMSCorrelationIDAsBytes, getJMSDeliveryMode, getJMSDestination, getJMSExpiration, getJMSMessageID, getJMSPriority, getJMSRedelivered, getJMSReplyTo, getJMSTimestamp, getJMSType, getLongProperty, getObjectProperty, getPropertyNames, getShortProperty, getStringProperty, propertyExists, setBooleanProperty, setByteProperty, setDoubleProperty, setFloatProperty, setIntProperty, setJMSCorrelationID, setJMSCorrelationIDAsBytes, setJMSDeliveryMode, setJMSDestination, setJMSExpiration, setJMSMessageID, setJMSPriority, setJMSRedelivered, setJMSReplyTo, setJMSTimestamp, setJMSType, setLongProperty, setObjectProperty, setShortProperty, setStringProperty
-
-
-
-
Field Detail
-
DATA_STRUCTURE_TYPE
public static final byte DATA_STRUCTURE_TYPE
- See Also:
- Constant Field Values
-
BINARY_MIME_TYPE
public static final String BINARY_MIME_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
copy
public Message copy()
- Overrides:
copyin classActiveMQMessage
-
getDataStructureType
public byte getDataStructureType()
- Specified by:
getDataStructureTypein interfaceDataStructure- Overrides:
getDataStructureTypein classActiveMQMessage- Returns:
- The type of the data structure
-
getRemoteBlobUrl
public String getRemoteBlobUrl()
-
setRemoteBlobUrl
public void setRemoteBlobUrl(String remoteBlobUrl)
-
getMimeType
public String getMimeType()
The MIME type of the BLOB which can be used to apply different content types to messages.- Specified by:
getMimeTypein interfaceBlobMessage
-
setMimeType
public void setMimeType(String mimeType)
Description copied from interface:BlobMessageSets the MIME type of the BLOB so that a consumer can process things nicely with a Java Activation Framework DataHandler- Specified by:
setMimeTypein interfaceBlobMessage
-
getName
public String getName()
- Specified by:
getNamein interfaceBlobMessage
-
setName
public void setName(String name)
The name of the attachment which can be useful information if transmitting files over ActiveMQ- Specified by:
setNamein interfaceBlobMessage
-
isDeletedByBroker
public boolean isDeletedByBroker()
-
setDeletedByBroker
public void setDeletedByBroker(boolean deletedByBroker)
-
getJMSXMimeType
public String getJMSXMimeType()
Description copied from interface:MessageReturns the MIME type of this mesage. This can be used in selectors to filter on the MIME types of the different JMS messages, or in the case ofBlobMessageit allows you to create a selector on the MIME type of the BLOB body- Specified by:
getJMSXMimeTypein interfaceMessage- Overrides:
getJMSXMimeTypein classActiveMQMessage
-
getInputStream
public InputStream getInputStream() throws IOException, JMSException
Description copied from interface:BlobMessageReturn the input stream to process the BLOB- Specified by:
getInputStreamin interfaceBlobMessage- Throws:
IOExceptionJMSException
-
getURL
public URL getURL() throws JMSException
Description copied from interface:BlobMessageReturns the URL for the blob if its available as an external URL (such as file, http, ftp etc) or null if there is no URL available- Specified by:
getURLin interfaceBlobMessage- Throws:
JMSException
-
setURL
public void setURL(URL url)
-
getBlobUploader
public BlobUploader getBlobUploader()
-
setBlobUploader
public void setBlobUploader(BlobUploader blobUploader)
-
getBlobDownloader
public BlobDownloader getBlobDownloader()
-
setBlobDownloader
public void setBlobDownloader(BlobDownloader blobDownloader)
-
onSend
public void onSend() throws JMSExceptionDescription copied from class:ActiveMQMessageSend operation event listener. Used to get the message ready to be sent.- Overrides:
onSendin classActiveMQMessage- Throws:
JMSException
-
deleteFile
public void deleteFile() throws IOException, JMSException- Throws:
IOExceptionJMSException
-
-