Class TypedProperties
- java.lang.Object
-
- org.apache.activemq.artemis.utils.collections.TypedProperties
-
- Direct Known Subclasses:
TypedProperties
public class TypedProperties extends Object
Property Value Conversion.This implementation follows section 3.5.4 of the Java Message Service specification (Version 1.1 April 12, 2002).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classTypedProperties.StringValuestatic classTypedProperties.TypedPropertiesDecoderPoolsstatic classTypedProperties.TypedPropertiesStringSimpleStringPools
-
Constructor Summary
Constructors Constructor Description TypedProperties()TypedProperties(Predicate<SimpleString> internalPropertyPredicate)TypedProperties(TypedProperties other)
-
Method Summary
-
-
-
Constructor Detail
-
TypedProperties
public TypedProperties()
-
TypedProperties
public TypedProperties(Predicate<SimpleString> internalPropertyPredicate)
-
TypedProperties
public TypedProperties(TypedProperties other)
-
-
Method Detail
-
size
public int size()
Return the number of properties
-
getMemoryOffset
public int getMemoryOffset()
-
putBooleanProperty
public void putBooleanProperty(SimpleString key, boolean value)
-
putByteProperty
public void putByteProperty(SimpleString key, byte value)
-
putBytesProperty
public void putBytesProperty(SimpleString key, byte[] value)
-
putShortProperty
public void putShortProperty(SimpleString key, short value)
-
putIntProperty
public void putIntProperty(SimpleString key, int value)
-
putLongProperty
public void putLongProperty(SimpleString key, long value)
-
putFloatProperty
public void putFloatProperty(SimpleString key, float value)
-
putDoubleProperty
public void putDoubleProperty(SimpleString key, double value)
-
putSimpleStringProperty
public void putSimpleStringProperty(SimpleString key, SimpleString value)
-
putNullValue
public void putNullValue(SimpleString key)
-
putCharProperty
public void putCharProperty(SimpleString key, char value)
-
putTypedProperties
public void putTypedProperties(TypedProperties otherProps)
-
putProperty
public TypedProperties putProperty(SimpleString key, Object value)
-
getProperty
public Object getProperty(SimpleString key)
-
getBooleanProperty
public Boolean getBooleanProperty(SimpleString key) throws ActiveMQPropertyConversionException
-
getByteProperty
public Byte getByteProperty(SimpleString key, Supplier<Byte> defaultValue) throws ActiveMQPropertyConversionException
-
getByteProperty
public Byte getByteProperty(SimpleString key) throws ActiveMQPropertyConversionException
-
getCharProperty
public Character getCharProperty(SimpleString key) throws ActiveMQPropertyConversionException
-
getBytesProperty
public byte[] getBytesProperty(SimpleString key) throws ActiveMQPropertyConversionException
-
getDoubleProperty
public Double getDoubleProperty(SimpleString key) throws ActiveMQPropertyConversionException
-
getIntProperty
public Integer getIntProperty(SimpleString key) throws ActiveMQPropertyConversionException
-
getLongProperty
public Long getLongProperty(SimpleString key) throws ActiveMQPropertyConversionException
-
getShortProperty
public Short getShortProperty(SimpleString key) throws ActiveMQPropertyConversionException
-
getFloatProperty
public Float getFloatProperty(SimpleString key) throws ActiveMQPropertyConversionException
-
getSimpleStringProperty
public SimpleString getSimpleStringProperty(SimpleString key) throws ActiveMQPropertyConversionException
-
removeProperty
public Object removeProperty(SimpleString key)
-
containsProperty
public boolean containsProperty(SimpleString key)
-
getPropertyNames
public Set<SimpleString> getPropertyNames()
-
clearInternalProperties
public boolean clearInternalProperties()
-
forEachKey
public void forEachKey(Consumer<SimpleString> action)
-
forEach
public void forEach(BiConsumer<SimpleString,Object> action)
-
searchProperty
public static boolean searchProperty(SimpleString key, io.netty.buffer.ByteBuf buffer, int startIndex)
Performs a search among the valid key properties contained inbuffer, starting fromfromassuming it to be a valid encodedTypedPropertiescontent.- Throws:
IllegalStateException- if any not-valid property is found while searching thekeyproperty
-
decode
public void decode(io.netty.buffer.ByteBuf buffer, TypedProperties.TypedPropertiesDecoderPools keyValuePools)
-
decode
public void decode(io.netty.buffer.ByteBuf buffer)
-
encode
public int encode(io.netty.buffer.ByteBuf buffer)
-
getEncodeSize
public int getEncodeSize()
-
clear
public void clear()
-
isEmpty
public boolean isEmpty()
-
setObjectProperty
public static void setObjectProperty(SimpleString key, Object value, TypedProperties properties)
Helper for MapMessage#setObjectProperty(String, Object)- Parameters:
key- The SimpleString keyvalue- The Object valueproperties- The typed properties
-
-