public final class ClientLargeMessageImpl extends ClientMessageImpl implements ClientLargeMessageInternal
At the time of sending a regular Message is sent as we won't know the message is considered large until the buffer is filled up or the user set a streaming.
REPLYTO_HEADER_NAME
address, BODY_OFFSET, bodyBuffer, buffer, BUFFER_HEADER_SPACE, bufferValid, durable, HDR_BRIDGE_DUPLICATE_ID, HDR_ROUTE_TO_ACK_IDS, HDR_ROUTE_TO_IDS, HDR_SCALEDOWN_TO_IDS, messageID, priority, properties, timestamp, type
BYTES_TYPE, DEFAULT_TYPE, HDR_ACTUAL_EXPIRY_TIME, HDR_CONTENT_TYPE, HDR_DUPLICATE_DETECTION_ID, HDR_GROUP_ID, HDR_LARGE_BODY_SIZE, HDR_LARGE_COMPRESSED, HDR_LAST_VALUE_NAME, HDR_ORIG_MESSAGE_ID, HDR_ORIGINAL_ADDRESS, HDR_ORIGINAL_QUEUE, HDR_SCHEDULED_DELIVERY_TIME, HDR_VALIDATED_USER, MAP_TYPE, OBJECT_TYPE, STREAM_TYPE, TEXT_TYPE
Constructor and Description |
---|
ClientLargeMessageImpl() |
Modifier and Type | Method and Description |
---|---|
void |
checkCompletion()
This can be optionally used to verify if the entire message has been received.
|
void |
discardBody()
Discard unused packets (used on large-message)
|
ActiveMQBuffer |
getBodyBuffer()
Returns the message body as an ActiveMQBuffer
|
int |
getBodySize()
Returns the size (in bytes) of this message's body
|
int |
getEncodeSize()
Returns the size of the encoded message.
|
LargeMessageController |
getLargeMessageController() |
long |
getLargeMessageSize() |
boolean |
isLargeMessage()
Returns whether this message is a large message or a regular message.
|
void |
retrieveExistingData(ClientMessageInternal clMessage) |
void |
saveToOutputStream(OutputStream out)
Saves the content of the message to the OutputStream.
|
void |
setLargeMessageController(LargeMessageController controller) |
void |
setLargeMessageSize(long largeMessageSize) |
ClientLargeMessageImpl |
setOutputStream(OutputStream out)
Sets the OutputStream that will receive the content of a message received in a non blocking way.
|
boolean |
waitOutputStreamCompletion(long timeMilliseconds)
Wait the outputStream completion of the message.
|
acknowledge, getBodyEncoder, getBodyInputStream, getDeliveryCount, getFlowControlSize, individualAcknowledge, isCompressed, isServerMessage, onReceipt, putBooleanProperty, putBooleanProperty, putByteProperty, putByteProperty, putBytesProperty, putBytesProperty, putCharProperty, putCharProperty, putDoubleProperty, putDoubleProperty, putFloatProperty, putFloatProperty, putIntProperty, putIntProperty, putLongProperty, putLongProperty, putObjectProperty, putObjectProperty, putShortProperty, putShortProperty, putStringProperty, putStringProperty, setBodyInputStream, setDeliveryCount, setFlowControlSize, toString, writeBodyBufferBytes, writeBodyBufferString
bodyChanged, bodyToString, containsProperty, containsProperty, copyHeadersAndProperties, createBody, decode, decodeFromBuffer, decodeHeadersAndProperties, encode, encodeHeadersAndProperties, equals, getAddress, getBodyBufferDuplicate, getBooleanProperty, getBooleanProperty, getByteProperty, getByteProperty, getBytesProperty, getBytesProperty, getDoubleProperty, getDoubleProperty, getEncodedBuffer, getEndOfBodyPosition, getEndOfMessagePosition, getExpiration, getFloatProperty, getFloatProperty, getHeadersAndPropertiesEncodeSize, getIntProperty, getIntProperty, getLongProperty, getLongProperty, getMessageID, getObjectProperty, getObjectProperty, getPriority, getProperties, getPropertyNames, getShortProperty, getShortProperty, getSimpleStringProperty, getSimpleStringProperty, getStringProperty, getStringProperty, getTimestamp, getType, getTypedProperties, getUserID, getWholeBuffer, hashCode, isDurable, isExpired, putTypedProperties, removeProperty, removeProperty, setAddress, setAddressTransient, setDurable, setExpiration, setPriority, setTimestamp, setType, setUserID, toMap, toPropertyMap
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getFlowControlSize, getProperties, isCompressed, onReceipt, setAddressTransient, setFlowControlSize
acknowledge, getDeliveryCount, individualAcknowledge, putBooleanProperty, putBooleanProperty, putByteProperty, putByteProperty, putBytesProperty, putBytesProperty, putCharProperty, putCharProperty, putDoubleProperty, putDoubleProperty, putFloatProperty, putFloatProperty, putIntProperty, putIntProperty, putLongProperty, putLongProperty, putShortProperty, putShortProperty, putStringProperty, putStringProperty, setBodyInputStream, setDeliveryCount, writeBodyBufferBytes, writeBodyBufferString
containsProperty, containsProperty, getAddress, getBodyBufferDuplicate, getBooleanProperty, getBooleanProperty, getByteProperty, getByteProperty, getBytesProperty, getBytesProperty, getDoubleProperty, getDoubleProperty, getExpiration, getFloatProperty, getFloatProperty, getIntProperty, getIntProperty, getLongProperty, getLongProperty, getMessageID, getObjectProperty, getObjectProperty, getPriority, getPropertyNames, getShortProperty, getShortProperty, getSimpleStringProperty, getSimpleStringProperty, getStringProperty, getStringProperty, getTimestamp, getType, getUserID, isDurable, isExpired, putObjectProperty, putObjectProperty, removeProperty, removeProperty, setAddress, setDurable, setExpiration, setPriority, setTimestamp, setUserID, toMap, toPropertyMap
public void setLargeMessageSize(long largeMessageSize)
setLargeMessageSize
in interface ClientLargeMessageInternal
largeMessageSize
- the largeMessageSize to setpublic long getLargeMessageSize()
public int getEncodeSize()
Message
getEncodeSize
in interface Message
getEncodeSize
in class MessageImpl
public boolean isLargeMessage()
Message
isLargeMessage
in interface Message
isLargeMessage
in class ClientMessageImpl
public void setLargeMessageController(LargeMessageController controller)
setLargeMessageController
in interface ClientLargeMessageInternal
public void checkCompletion() throws ActiveMQException
ClientMessage
checkCompletion
in interface ClientMessage
checkCompletion
in class MessageImpl
ActiveMQException
public ActiveMQBuffer getBodyBuffer()
Message
getBodyBuffer
in interface Message
getBodyBuffer
in class MessageImpl
public int getBodySize()
ClientMessage
getBodySize
in interface ClientMessage
getBodySize
in class ClientMessageImpl
public LargeMessageController getLargeMessageController()
getLargeMessageController
in interface ClientLargeMessageInternal
public void saveToOutputStream(OutputStream out) throws ActiveMQException
ClientMessage
saveToOutputStream
in interface ClientMessage
saveToOutputStream
in class ClientMessageImpl
ActiveMQException
public ClientLargeMessageImpl setOutputStream(OutputStream out) throws ActiveMQException
ClientMessage
setOutputStream
in interface ClientMessage
setOutputStream
in class ClientMessageImpl
ActiveMQException
public boolean waitOutputStreamCompletion(long timeMilliseconds) throws ActiveMQException
ClientMessage
waitOutputStreamCompletion
in interface ClientMessage
waitOutputStreamCompletion
in class ClientMessageImpl
timeMilliseconds
- - 0 means wait foreverActiveMQException
public void discardBody()
ClientMessageInternal
discardBody
in interface ClientMessageInternal
discardBody
in class ClientMessageImpl
public void retrieveExistingData(ClientMessageInternal clMessage)
Copyright © 2017 JBoss by Red Hat. All rights reserved.