@Target(value=METHOD) @Retention(value=RUNTIME) @Documented @MinMuleVersion(value="4.5.0") public @interface OutputResolver
OutputTypeResolver that will be used to resolve the Component's return
type dynamically| Modifier and Type | Optional Element and Description |
|---|---|
Class<? extends AttributesTypeResolver> |
attributes
Specifies the
AttributesTypeResolver which should be used to resolve the type of the Message#getAttributes()
of the output message. |
Class<? extends OutputTypeResolver> |
output
Specifies the
OutputTypeResolver which should be used to resolve the type of the value which will go into the payload
of the output message. |
public abstract Class<? extends OutputTypeResolver> output
OutputTypeResolver which should be used to resolve the type of the value which will go into the payload
of the output message.
Always keep in mind that this should resolve to a single unitary type. That means that for operations which return
collections, this should not return an ArrayType but the type of the items inside the collection.
So, if the operation returns List<Apple>, this should return a MetadataType for the Apple. Also, if
the operation returns List<Result<Apple, AppleAttributes>>, it still should only return the Apple's metadata.
OutputTypeResolver for the annotated Componentpublic abstract Class<? extends AttributesTypeResolver> attributes
AttributesTypeResolver which should be used to resolve the type of the Message#getAttributes()
of the output message.
Always consider that this resolver should be consistent with the one returned by output().
So, if the operation returns List<Apple>, this should return a MetadataType for attributes which describe the
Apple, not the list. . Also, if the operation returns List<Result<Apple, AppleAttributes>>, it still should
only describe AppleAttributes.
AttributesTypeResolver for the annotated ComponentCopyright © 2023. All rights reserved.