@Override public MessageAnnotations construct(Object underlying) throws AmqpErrorException { if(underlying instanceof Map) { return new MessageAnnotations((Map)underlying); } else { final String msg = String.format("Cannot decode 'message-annotations' from '%s'", underlying == null ? null : underlying.getClass().getSimpleName()); throw new AmqpErrorException(AmqpError.DECODE_ERROR, msg); } }
public MessageAnnotationsWriter(final Registry registry, final MessageAnnotations object) { super(DESCRIPTOR_WRITER, registry.getValueWriter(object.getValue())); }
return new MessageMetaData_1_0(header.createEncodingRetainingSection(), null, messageAnnotation == null ? null : messageAnnotation.createEncodingRetainingSection(), props.createEncodingRetainingSection(), applicationProperties == null ? null : applicationProperties.createEncodingRetainingSection(),
messageAnnotations == null ? null : messageAnnotations.createEncodingRetainingSection(), props.createEncodingRetainingSection(), applicationProperties.createEncodingRetainingSection(),
messageAnnotation == null ? null : messageAnnotation.createEncodingRetainingSection(), properties.createEncodingRetainingSection(), applicationProperties == null ? null : applicationProperties.createEncodingRetainingSection(),
messageAnnotations = new MessageAnnotations(Collections.singletonMap(key, TEXT_MESSAGE.getType())); messageAnnotations = new MessageAnnotations(Collections.singletonMap(key, BYTES_MESSAGE.getType())); messageAnnotations = new MessageAnnotations(Collections.singletonMap(key, MAP_MESSAGE.getType())); new MessageAnnotations(Collections.singletonMap(key, STREAM_MESSAGE.getType())); messageAnnotations = new MessageAnnotations(Collections.singletonMap(key, OBJECT_MESSAGE.getType())); messageAnnotations = new MessageAnnotations(Collections.singletonMap(key, MESSAGE.getType()));
return new MessageAnnotations(Collections.singletonMap(Symbol.valueOf("x-opt-jms-msg-type"), contentTypeAnnotationValue));