Annotation Interface OutputResolver
OutputTypeResolver that will be used to resolve the Component's return
type dynamically- Since:
- 1.0
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionClass<? extends org.mule.runtime.api.metadata.resolving.AttributesTypeResolver>Specifies theAttributesTypeResolverwhich should be used to resolve the type of theMessage.getAttributes()of the output message.Class<? extends org.mule.runtime.api.metadata.resolving.OutputTypeResolver>Specifies theOutputTypeResolverwhich should be used to resolve the type of the value which will go into the payload of the output message.
-
Element Details
-
output
Class<? extends org.mule.runtime.api.metadata.resolving.OutputTypeResolver> outputSpecifies theOutputTypeResolverwhich 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
ArrayTypebut the type of the items inside the collection.So, if the operation returns
List<Apple>, this should return aMetadataTypefor theApple. Also, if the operation returnsList<Result<Apple, AppleAttributes>>, it still should only return theApple'smetadata.- Returns:
- the associated
OutputTypeResolverfor the annotated Component
- Default:
- org.mule.runtime.extension.api.metadata.NullMetadataResolver.class
-
attributes
Class<? extends org.mule.runtime.api.metadata.resolving.AttributesTypeResolver> attributesSpecifies theAttributesTypeResolverwhich should be used to resolve the type of theMessage.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 aMetadataTypefor attributes which describe theApple, not the list. . Also, if the operation returnsList<Result<Apple, AppleAttributes>>, it still should only describeAppleAttributes.- Returns:
- the associated
AttributesTypeResolverfor the annotated Component
- Default:
- org.mule.runtime.extension.api.metadata.NullMetadataResolver.class
-