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 ofBlobMessage
for 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 String
BINARY_MIME_TYPE
static byte
DATA_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 Message
copy()
void
deleteFile()
BlobDownloader
getBlobDownloader()
BlobUploader
getBlobUploader()
byte
getDataStructureType()
InputStream
getInputStream()
Return the input stream to process the BLOBString
getJMSXMimeType()
Returns the MIME type of this mesage.String
getMimeType()
The MIME type of the BLOB which can be used to apply different content types to messages.String
getName()
String
getRemoteBlobUrl()
URL
getURL()
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 availableboolean
isDeletedByBroker()
void
onSend()
Send operation event listener.void
setBlobDownloader(BlobDownloader blobDownloader)
void
setBlobUploader(BlobUploader blobUploader)
void
setDeletedByBroker(boolean deletedByBroker)
void
setMimeType(String mimeType)
Sets the MIME type of the BLOB so that a consumer can process things nicely with a Java Activation Framework DataHandlervoid
setName(String name)
The name of the attachment which can be useful information if transmitting files over ActiveMQvoid
setRemoteBlobUrl(String remoteBlobUrl)
void
setURL(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:
copy
in classActiveMQMessage
-
getDataStructureType
public byte getDataStructureType()
- Specified by:
getDataStructureType
in interfaceDataStructure
- Overrides:
getDataStructureType
in 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:
getMimeType
in interfaceBlobMessage
-
setMimeType
public void setMimeType(String mimeType)
Description copied from interface:BlobMessage
Sets the MIME type of the BLOB so that a consumer can process things nicely with a Java Activation Framework DataHandler- Specified by:
setMimeType
in interfaceBlobMessage
-
getName
public String getName()
- Specified by:
getName
in interfaceBlobMessage
-
setName
public void setName(String name)
The name of the attachment which can be useful information if transmitting files over ActiveMQ- Specified by:
setName
in interfaceBlobMessage
-
isDeletedByBroker
public boolean isDeletedByBroker()
-
setDeletedByBroker
public void setDeletedByBroker(boolean deletedByBroker)
-
getJMSXMimeType
public String getJMSXMimeType()
Description copied from interface:Message
Returns 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 ofBlobMessage
it allows you to create a selector on the MIME type of the BLOB body- Specified by:
getJMSXMimeType
in interfaceMessage
- Overrides:
getJMSXMimeType
in classActiveMQMessage
-
getInputStream
public InputStream getInputStream() throws IOException, JMSException
Description copied from interface:BlobMessage
Return the input stream to process the BLOB- Specified by:
getInputStream
in interfaceBlobMessage
- Throws:
IOException
JMSException
-
getURL
public URL getURL() throws JMSException
Description copied from interface:BlobMessage
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 available- Specified by:
getURL
in 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 JMSException
Description copied from class:ActiveMQMessage
Send operation event listener. Used to get the message ready to be sent.- Overrides:
onSend
in classActiveMQMessage
- Throws:
JMSException
-
deleteFile
public void deleteFile() throws IOException, JMSException
- Throws:
IOException
JMSException
-
-