Interface MethodReturnManufacturerContext<T>
public interface MethodReturnManufacturerContext<T>
Context for the
MethodReturnManufacturer.- Author:
- Daniel Sagenschneider
-
Method Summary
Modifier and TypeMethodDescription<E extends Throwable>
ManagedFunctionEscalationTypeBuilderaddEscalation(Class<E> escalationType) Adds aManagedFunctionEscalationTypeBuilderto theManagedFunctionTypeBuilderdefinition.Obtains the name of theManagedFunction.Obtains theMethod.Obtains theAnnotationinstances for theMethod.Class<?>Obtains theSourceContext.voidsetTranslatedReturnClass(Class<? super T> translatedReturnClass)
-
Method Details
-
getReturnClass
Class<?> getReturnClass() -
setTranslatedReturnClass
Overrides the return
Classto the translated returnClass.Should this not be invoked, then the default
MethodreturnClassis used.- Parameters:
translatedReturnClass- Translated returnClass.
-
getMethodAnnotations
Annotation[] getMethodAnnotations()Obtains theAnnotationinstances for theMethod.- Returns:
Annotationinstances for theMethod.
-
getFunctionName
String getFunctionName()Obtains the name of theManagedFunction.- Returns:
- Name of the
ManagedFunction.
-
getMethod
Method getMethod()Obtains the
Method.Due to type erasure, the type information on the return
Classmay be lost. This allows more information to be derived about the return type.- Returns:
Method.
-
addEscalation
Adds a
ManagedFunctionEscalationTypeBuilderto theManagedFunctionTypeBuilderdefinition.It is possible the
MethodReturnTranslatorwill throw anEscalation. While this should be avoided, this allows registeringEscalationfor being handled.- Type Parameters:
E-Escalationtype.- Parameters:
escalationType- Type to be handled by anEscalationFlow.- Returns:
ManagedFunctionEscalationTypeBuilderto provide thetype definition.
-
getSourceContext
SourceContext getSourceContext()Obtains theSourceContext.- Returns:
SourceContext.
-