public interface Message
| | boolean byte short int long float double String byte[] |---------------------------------------------------------------- |boolean | X X |byte | X X X X X |short | X X X X |int | X X X |long | X X |float | X X X |double | X X |String | X X X X X X X X |byte[] | X |-----------------------------------------------------------------
getFloatProperty
on a property set a boolean
),
a PropertyConversionException will be thrown.Modifier and Type | Field and Description |
---|---|
static byte |
BYTES_TYPE |
static byte |
DEFAULT_TYPE |
static SimpleString |
HDR_ACTUAL_EXPIRY_TIME |
static SimpleString |
HDR_DUPLICATE_DETECTION_ID |
static SimpleString |
HDR_GROUP_ID |
static SimpleString |
HDR_LARGE_BODY_SIZE |
static SimpleString |
HDR_LARGE_COMPRESSED |
static SimpleString |
HDR_LAST_VALUE_NAME |
static SimpleString |
HDR_ORIG_MESSAGE_ID |
static SimpleString |
HDR_ORIGINAL_ADDRESS |
static SimpleString |
HDR_SCHEDULED_DELIVERY_TIME |
static byte |
MAP_TYPE |
static byte |
OBJECT_TYPE |
static byte |
STREAM_TYPE |
static byte |
TEXT_TYPE |
Modifier and Type | Method and Description |
---|---|
boolean |
containsProperty(SimpleString key)
Returns
true if this message contains a property with the given key, false else. |
boolean |
containsProperty(java.lang.String key) |
SimpleString |
getAddress()
Returns the address this message is sent to.
|
HornetQBuffer |
getBodyBuffer()
Returns the message body as a HornetQBuffer
|
java.lang.Boolean |
getBooleanProperty(SimpleString key)
Returns the property corresponding to the specified key as a Boolean.
|
java.lang.Boolean |
getBooleanProperty(java.lang.String key) |
java.lang.Byte |
getByteProperty(SimpleString key)
Returns the property corresponding to the specified key as a Byte.
|
java.lang.Byte |
getByteProperty(java.lang.String key) |
byte[] |
getBytesProperty(SimpleString key)
Returns the property corresponding to the specified key as a byte[].
|
byte[] |
getBytesProperty(java.lang.String key) |
java.lang.Double |
getDoubleProperty(SimpleString key)
Returns the property corresponding to the specified key as a Double.
|
java.lang.Double |
getDoubleProperty(java.lang.String key) |
int |
getEncodeSize()
Returns the size of the encoded message.
|
long |
getExpiration()
Returns the expiration time of this message.
|
java.lang.Float |
getFloatProperty(SimpleString key)
Returns the property corresponding to the specified key as a Float.
|
java.lang.Float |
getFloatProperty(java.lang.String key) |
java.lang.Integer |
getIntProperty(SimpleString key)
Returns the property corresponding to the specified key as an Integer.
|
java.lang.Integer |
getIntProperty(java.lang.String key) |
java.lang.Long |
getLongProperty(SimpleString key)
Returns the property corresponding to the specified key as a Long.
|
java.lang.Long |
getLongProperty(java.lang.String key) |
long |
getMessageID()
Returns the messageID.
|
java.lang.Object |
getObjectProperty(SimpleString key)
Returns the property corresponding to the specified key
|
java.lang.Object |
getObjectProperty(java.lang.String key) |
byte |
getPriority()
Returns the message priority.
|
java.util.Set<SimpleString> |
getPropertyNames()
Returns all the names of the properties for this message.
|
java.lang.Short |
getShortProperty(SimpleString key)
Returns the property corresponding to the specified key as a Short.
|
java.lang.Short |
getShortProperty(java.lang.String key) |
SimpleString |
getSimpleStringProperty(SimpleString key)
Returns the property corresponding to the specified key as a SimpleString.
|
SimpleString |
getSimpleStringProperty(java.lang.String key) |
java.lang.String |
getStringProperty(SimpleString key)
Returns the property corresponding to the specified key as a String.
|
java.lang.String |
getStringProperty(java.lang.String key) |
long |
getTimestamp()
Returns the message timestamp.
|
byte |
getType()
Returns this message type.
|
org.hornetq.utils.UUID |
getUserID()
Returns the userID - this is an optional user specified UUID that can be set to identify the message
and will be passed around with the message
|
boolean |
isDurable()
Returns whether this message is durable or not.
|
boolean |
isExpired()
Returns whether this message is expired or not.
|
boolean |
isLargeMessage()
Returns whether this message is a large message or a regular message.
|
void |
putBooleanProperty(SimpleString key,
boolean value)
Puts a boolean property in this message.
|
void |
putBooleanProperty(java.lang.String key,
boolean value) |
void |
putByteProperty(SimpleString key,
byte value)
Puts a byte property in this message.
|
void |
putByteProperty(java.lang.String key,
byte value) |
void |
putBytesProperty(SimpleString key,
byte[] value)
Puts a byte[] property in this message.
|
void |
putBytesProperty(java.lang.String key,
byte[] value) |
void |
putDoubleProperty(SimpleString key,
double value)
Puts a double property in this message.
|
void |
putDoubleProperty(java.lang.String key,
double value) |
void |
putFloatProperty(SimpleString key,
float value)
Puts a float property in this message.
|
void |
putFloatProperty(java.lang.String key,
float value) |
void |
putIntProperty(SimpleString key,
int value)
Puts a int property in this message.
|
void |
putIntProperty(java.lang.String key,
int value) |
void |
putLongProperty(SimpleString key,
long value)
Puts a long property in this message.
|
void |
putLongProperty(java.lang.String key,
long value) |
void |
putObjectProperty(SimpleString key,
java.lang.Object value)
Puts an Object property in this message.
|
void |
putObjectProperty(java.lang.String key,
java.lang.Object value) |
void |
putShortProperty(SimpleString key,
short value)
Puts a short property in this message.
|
void |
putShortProperty(java.lang.String key,
short value) |
void |
putStringProperty(SimpleString key,
SimpleString value)
Puts a SimpleString property in this message.
|
void |
putStringProperty(java.lang.String key,
java.lang.String value)
Puts a String property in this message.
|
java.lang.Object |
removeProperty(SimpleString key)
Removes the property corresponding to the specified key.
|
java.lang.Object |
removeProperty(java.lang.String key) |
void |
setAddress(SimpleString address)
Sets the address to send this message to.
|
void |
setDurable(boolean durable)
Sets whether this message is durable or not.
|
void |
setExpiration(long expiration)
Sets the expiration of this message.
|
void |
setPriority(byte priority)
Sets the message priority.
|
void |
setTimestamp(long timestamp)
Sets the message timestamp.
|
void |
setUserID(org.hornetq.utils.UUID userID)
Sets the user ID
|
java.util.Map<java.lang.String,java.lang.Object> |
toMap() |
static final SimpleString HDR_ACTUAL_EXPIRY_TIME
static final SimpleString HDR_ORIGINAL_ADDRESS
static final SimpleString HDR_ORIG_MESSAGE_ID
static final SimpleString HDR_GROUP_ID
static final SimpleString HDR_LARGE_COMPRESSED
static final SimpleString HDR_LARGE_BODY_SIZE
static final SimpleString HDR_SCHEDULED_DELIVERY_TIME
static final SimpleString HDR_DUPLICATE_DETECTION_ID
static final SimpleString HDR_LAST_VALUE_NAME
static final byte DEFAULT_TYPE
static final byte OBJECT_TYPE
static final byte TEXT_TYPE
static final byte BYTES_TYPE
static final byte MAP_TYPE
static final byte STREAM_TYPE
long getMessageID()
org.hornetq.utils.UUID getUserID()
void setUserID(org.hornetq.utils.UUID userID)
userID
- SimpleString getAddress()
void setAddress(SimpleString address)
address
- address to send the message tobyte getType()
boolean isDurable()
void setDurable(boolean durable)
durable
- true
to flag this message as durable, false
elselong getExpiration()
boolean isExpired()
void setExpiration(long expiration)
expiration
- expiration timelong getTimestamp()
void setTimestamp(long timestamp)
timestamp
- timestampbyte getPriority()
void setPriority(byte priority)
priority
- the new message priorityint getEncodeSize()
boolean isLargeMessage()
HornetQBuffer getBodyBuffer()
void putBooleanProperty(SimpleString key, boolean value)
key
- property namevalue
- property valuevoid putBooleanProperty(java.lang.String key, boolean value)
void putByteProperty(SimpleString key, byte value)
key
- property namevalue
- property valuevoid putByteProperty(java.lang.String key, byte value)
putByteProperty(SimpleString, byte)
void putBytesProperty(SimpleString key, byte[] value)
key
- property namevalue
- property valuevoid putBytesProperty(java.lang.String key, byte[] value)
void putShortProperty(SimpleString key, short value)
key
- property namevalue
- property valuevoid putShortProperty(java.lang.String key, short value)
void putIntProperty(SimpleString key, int value)
key
- property namevalue
- property valuevoid putIntProperty(java.lang.String key, int value)
putIntProperty(SimpleString, int)
void putLongProperty(SimpleString key, long value)
key
- property namevalue
- property valuevoid putLongProperty(java.lang.String key, long value)
putLongProperty(SimpleString, long)
void putFloatProperty(SimpleString key, float value)
key
- property namevalue
- property valuevoid putFloatProperty(java.lang.String key, float value)
void putDoubleProperty(SimpleString key, double value)
key
- property namevalue
- property valuevoid putDoubleProperty(java.lang.String key, double value)
void putStringProperty(SimpleString key, SimpleString value)
key
- property namevalue
- property valuevoid putStringProperty(java.lang.String key, java.lang.String value)
key
- property namevalue
- property valuevoid putObjectProperty(SimpleString key, java.lang.Object value) throws PropertyConversionException
key
- property namevalue
- property valuePropertyConversionException
- if the value is not one of the accepted property types.void putObjectProperty(java.lang.String key, java.lang.Object value) throws PropertyConversionException
PropertyConversionException
putObjectProperty(SimpleString, Object)
java.lang.Object removeProperty(SimpleString key)
key
- property namejava.lang.Object removeProperty(java.lang.String key)
removeProperty(SimpleString)
boolean containsProperty(SimpleString key)
true
if this message contains a property with the given key, false
else.key
- property nameboolean containsProperty(java.lang.String key)
containsProperty(SimpleString)
java.lang.Boolean getBooleanProperty(SimpleString key) throws PropertyConversionException
PropertyConversionException
- if the value can not be converted to a Booleanjava.lang.Boolean getBooleanProperty(java.lang.String key) throws PropertyConversionException
PropertyConversionException
getBooleanProperty(SimpleString)
java.lang.Byte getByteProperty(SimpleString key) throws PropertyConversionException
PropertyConversionException
- if the value can not be converted to a Bytejava.lang.Byte getByteProperty(java.lang.String key) throws PropertyConversionException
PropertyConversionException
getByteProperty(SimpleString)
java.lang.Double getDoubleProperty(SimpleString key) throws PropertyConversionException
PropertyConversionException
- if the value can not be converted to a Doublejava.lang.Double getDoubleProperty(java.lang.String key) throws PropertyConversionException
PropertyConversionException
getDoubleProperty(SimpleString)
java.lang.Integer getIntProperty(SimpleString key) throws PropertyConversionException
PropertyConversionException
- if the value can not be converted to an Integerjava.lang.Integer getIntProperty(java.lang.String key) throws PropertyConversionException
PropertyConversionException
getIntProperty(SimpleString)
java.lang.Long getLongProperty(SimpleString key) throws PropertyConversionException
PropertyConversionException
- if the value can not be converted to a Longjava.lang.Long getLongProperty(java.lang.String key) throws PropertyConversionException
PropertyConversionException
getLongProperty(SimpleString)
java.lang.Object getObjectProperty(SimpleString key)
java.lang.Object getObjectProperty(java.lang.String key)
getBooleanProperty(SimpleString)
java.lang.Short getShortProperty(SimpleString key) throws PropertyConversionException
PropertyConversionException
- if the value can not be converted to a Shortjava.lang.Short getShortProperty(java.lang.String key) throws PropertyConversionException
PropertyConversionException
getShortProperty(SimpleString)
java.lang.Float getFloatProperty(SimpleString key) throws PropertyConversionException
PropertyConversionException
- if the value can not be converted to a Floatjava.lang.Float getFloatProperty(java.lang.String key) throws PropertyConversionException
PropertyConversionException
getFloatProperty(SimpleString)
java.lang.String getStringProperty(SimpleString key) throws PropertyConversionException
PropertyConversionException
- if the value can not be converted to a Stringjava.lang.String getStringProperty(java.lang.String key) throws PropertyConversionException
PropertyConversionException
getStringProperty(SimpleString)
SimpleString getSimpleStringProperty(SimpleString key) throws PropertyConversionException
PropertyConversionException
- if the value can not be converted to a SimpleStringSimpleString getSimpleStringProperty(java.lang.String key) throws PropertyConversionException
PropertyConversionException
getSimpleStringProperty(SimpleString)
byte[] getBytesProperty(SimpleString key) throws PropertyConversionException
PropertyConversionException
- if the value can not be converted to a byte[]byte[] getBytesProperty(java.lang.String key) throws PropertyConversionException
PropertyConversionException
getBytesProperty(SimpleString)
java.util.Set<SimpleString> getPropertyNames()
java.util.Map<java.lang.String,java.lang.Object> toMap()
Copyright © 2009 Red Hat Inc. All Rights Reserved.