@Override public byte[] getBytesProperty(final SimpleString key) throws ActiveMQPropertyConversionException { checkProperties(); return properties.getBytesProperty(key); }
@Override public Set<SimpleString> getPropertyNames() { checkProperties(); return properties.getPropertyNames(); }
@Override public Long getScheduledDeliveryTime() { checkProperties(); Object property = getObjectProperty(Message.HDR_SCHEDULED_DELIVERY_TIME); if (property != null && property instanceof Number) { return ((Number) property).longValue(); } return 0L; }
@Override public Integer getIntProperty(final SimpleString key) throws ActiveMQPropertyConversionException { checkProperties(); return properties.getIntProperty(key); }
@Override public SimpleString getSimpleStringProperty(final SimpleString key) throws ActiveMQPropertyConversionException { checkProperties(); return properties.getSimpleStringProperty(key); }
@Override public boolean containsProperty(final SimpleString key) { checkProperties(); return properties.containsProperty(key); }
@Override public CoreMessage putLongProperty(final SimpleString key, final long value) { messageChanged(); checkProperties(); properties.putLongProperty(key, value); return this; }
@Override public CoreMessage setScheduledDeliveryTime(Long time) { checkProperties(); if (time == null || time == 0) { removeProperty(Message.HDR_SCHEDULED_DELIVERY_TIME); } else { putLongProperty(Message.HDR_SCHEDULED_DELIVERY_TIME, time); } return this; }
@Override public CoreMessage putShortProperty(final SimpleString key, final short value) { messageChanged(); checkProperties(); properties.putShortProperty(key, value); return this; }
@Override public Double getDoubleProperty(final SimpleString key) throws ActiveMQPropertyConversionException { messageChanged(); checkProperties(); return properties.getDoubleProperty(key); }
@Override public CoreMessage putStringProperty(final SimpleString key, final SimpleString value) { messageChanged(); checkProperties(); properties.putSimpleStringProperty(key, value); return this; }
@Override public Boolean getBooleanProperty(final String key) throws ActiveMQPropertyConversionException { checkProperties(); return properties.getBooleanProperty(SimpleString.toSimpleString(key, getPropertyKeysPool())); }
@Override public Short getShortProperty(final String key) throws ActiveMQPropertyConversionException { checkProperties(); return properties.getShortProperty(SimpleString.toSimpleString(key, getPropertyKeysPool())); }
@Override public SimpleString getSimpleStringProperty(final String key) throws ActiveMQPropertyConversionException { checkProperties(); return properties.getSimpleStringProperty(SimpleString.toSimpleString(key, getPropertyKeysPool())); }
@Override public CoreMessage putFloatProperty(final String key, final float value) { messageChanged(); checkProperties(); properties.putFloatProperty(SimpleString.toSimpleString(key, getPropertyKeysPool()), value); return this; }
@Override public CoreMessage putDoubleProperty(final String key, final double value) { messageChanged(); checkProperties(); properties.putDoubleProperty(SimpleString.toSimpleString(key, getPropertyKeysPool()), value); return this; }
@Override public CoreMessage putByteProperty(final String key, final byte value) { messageChanged(); checkProperties(); properties.putByteProperty(SimpleString.toSimpleString(key, getPropertyKeysPool()), value); return this; }
@Override public CoreMessage putIntProperty(final String key, final int value) { messageChanged(); checkProperties(); properties.putIntProperty(SimpleString.toSimpleString(key, getPropertyKeysPool()), value); return this; }
@Override public String toString() { try { checkProperties(); return "CoreMessage[messageID=" + messageID + ",durable=" + isDurable() + ",userID=" + getUserID() + ",priority=" + this.getPriority() + ", timestamp=" + toDate(getTimestamp()) + ",expiration=" + toDate(getExpiration()) + ", durable=" + durable + ", address=" + getAddress() + ",size=" + getPersistentSize() + ",properties=" + properties + "]@" + System.identityHashCode(this); } catch (Throwable e) { logger.warn("Error creating String for message: ", e); return "ServerMessage[messageID=" + messageID + "]"; } }
@Override public CoreMessage putStringProperty(final String key, final String value) { messageChanged(); checkProperties(); properties.putSimpleStringProperty(SimpleString.toSimpleString(key, getPropertyKeysPool()), SimpleString.toSimpleString(value, getPropertyValuesPool())); return this; }