|
webMethods Broker API for JMS Version 9.5.1.0.171 091713 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface WmFileMessage
A WmFileMessage
object is used to stream a file that is too large to load into memory. The specified file is read in fragments and sent to the
consumers who will save the fragments to a file.
The sender of this message must first set the filename before sending:
WmFileMessage fileMessage = session.createFileMessage(); fileMessage.setFilename("/tmp/bigfile"); producer.send(fileMessage);
The receiver of this message sets the filename to initiate the transfer:
WmFileMessage fileMessage = (WmFileMessage) consumer.receive(); String filename = fileMessage.getFilename(); fileMessage.saveFile("/download/" + filename);
Field Summary |
---|
Fields inherited from interface com.webmethods.jms.WmMessage |
---|
WM_JMS_CLUSTER_NODES, WM_JMS_CLUSTER_NODES_DELIMITER |
Fields inherited from interface javax.jms.Message |
---|
DEFAULT_DELIVERY_MODE, DEFAULT_PRIORITY, DEFAULT_TIME_TO_LIVE |
Method Summary | |
---|---|
long |
getBytesTransferred()
Deprecated. Gets the total number of bytes transferred. |
java.lang.String |
getFilename()
Deprecated. Get the name of the file associated with the message. |
int |
getPacketSize()
Deprecated. Get the maximum number of bytes to read from the file at one time and send. |
WmMessageProducer |
getProducer()
Deprecated. Gets the producer with which the WmFileMessage is to be sent. |
long |
getRequestTimeout()
Deprecated. Get the transfer request timeout value. |
long |
getTransferTimeout()
Deprecated. Get the transfer timeout value. |
void |
saveFile(java.lang.String filename)
Deprecated. Once the message has been received this method is used to save the contents to the specified file. |
void |
setBytesTransferred(long bytesTransferred)
Deprecated. Sets the total number of bytes transferred. |
void |
setFilename(java.lang.String filename)
Deprecated. Set the name of the file associated with the message. |
void |
setPacketSize(int packetSize)
Deprecated. Set the maximum number of bytes to read from the file at one time and send. |
void |
setProducer(WmMessageProducer producer)
Deprecated. Sets the producer with which the WmFileMessage is to be sent. |
void |
setRequestTimeout(long requestTimeout)
Deprecated. Set the transfer request timeout value. |
void |
setTransferTimeout(long transferTimeout)
Deprecated. Set the transfer timeout value. |
Methods inherited from interface com.webmethods.jms.WmMessage |
---|
explicitAcknowledge, getCompression, getCompressionLevel, getCompressionRatio, getSize, negativeAcknowledge, setAccessLabel, setCompression, setCompressionLevel |
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 |
Method Detail |
---|
void setFilename(java.lang.String filename) throws java.io.FileNotFoundException, javax.jms.JMSException
This method is used to specify which file is to be streamed when the message is sent.
filename
- The name of the file associated with the message.
java.io.FileNotFoundException
- If the file is invalid.
javax.jms.JMSException
- If unable to set the name of the file.java.lang.String getFilename() throws javax.jms.JMSException
If this message has been received by a message consumer then this method will return only the file's name without the path. Otherwise, this method will return the fully qualified file's name including the path.
javax.jms.JMSException
- If unable to get the name of the file.void saveFile(java.lang.String filename) throws java.io.FileNotFoundException, javax.jms.JMSException
filename
- The location to save the file.
java.io.FileNotFoundException
- If the file is invalid.
javax.jms.JMSException
- If unable to save the file.void setPacketSize(int packetSize) throws javax.jms.JMSException
packetSize
- The maximum number of bytes to read and send.
javax.jms.JMSException
- If unable to set the packet size.int getPacketSize() throws javax.jms.JMSException
javax.jms.JMSException
- If unable to get the packet size.void setTransferTimeout(long transferTimeout) throws javax.jms.JMSException
The producer uses this timeout value to indicate how long to wait for a packet acknowledgement from the consumers.
The consumer uses this timeout value to indicate how long to wait for the next packet from the producer.
The default value is 15000 milliseconds. A timeout of zero never expires.
transferTimeout
- The transfer timeout value in milliseconds.
javax.jms.JMSException
- If unable to set the timeout.long getTransferTimeout() throws javax.jms.JMSException
javax.jms.JMSException
- If unable to get the timeout.void setRequestTimeout(long requestTimeout) throws javax.jms.JMSException
The default value is 15000 milliseconds. A timeout of zero never expires.
requestTimeout
- The request timeout value in milliseconds.
javax.jms.JMSException
- If unable to set the timeoutlong getRequestTimeout() throws javax.jms.JMSException
javax.jms.JMSException
- If unable to get the timeout.void setBytesTransferred(long bytesTransferred) throws javax.jms.JMSException
This value is set by the JMS provider once the transfer has completed.
bytesTransferred
-
javax.jms.JMSException
long getBytesTransferred() throws javax.jms.JMSException
javax.jms.JMSException
- If unable to get the number of bytes transferred.void setProducer(WmMessageProducer producer) throws javax.jms.JMSException
producer
-
javax.jms.JMSException
WmMessageProducer getProducer() throws javax.jms.JMSException
javax.jms.JMSException
|
webMethods Broker API for JMS Version 9.5.1.0.171 091713 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |