Interface MethodReturnManufacturerContext<T>
-
public interface MethodReturnManufacturerContext<T>Context for theMethodReturnManufacturer.- Author:
- Daniel Sagenschneider
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <E extends java.lang.Throwable>
ManagedFunctionEscalationTypeBuilderaddEscalation(java.lang.Class<E> escalationType)Adds aManagedFunctionEscalationTypeBuilderto theManagedFunctionTypeBuilderdefinition.java.lang.StringgetFunctionName()Obtains the name of theManagedFunction.java.lang.reflect.MethodgetMethod()Obtains theMethod.java.lang.annotation.Annotation[]getMethodAnnotations()Obtains theAnnotationinstances for theMethod.java.lang.Class<?>getReturnClass()Obtains theClassof theMethodreturn.SourceContextgetSourceContext()Obtains theSourceContext.voidsetTranslatedReturnClass(java.lang.Class<? super T> translatedReturnClass)Overrides the returnClassto the translated returnClass.
-
-
-
Method Detail
-
getReturnClass
java.lang.Class<?> getReturnClass()
Obtains theClassof theMethodreturn.- Returns:
Classof theMethodreturn.
-
setTranslatedReturnClass
void setTranslatedReturnClass(java.lang.Class<? super T> translatedReturnClass)
Overrides the return
Classto the translated returnClass.Should this not be invoked, then the default
MethodreturnClassis used.- Parameters:
translatedReturnClass- Translated returnClass.
-
getMethodAnnotations
java.lang.annotation.Annotation[] getMethodAnnotations()
Obtains theAnnotationinstances for theMethod.- Returns:
Annotationinstances for theMethod.
-
getFunctionName
java.lang.String getFunctionName()
Obtains the name of theManagedFunction.- Returns:
- Name of the
ManagedFunction.
-
getMethod
java.lang.reflect.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
<E extends java.lang.Throwable> ManagedFunctionEscalationTypeBuilder addEscalation(java.lang.Class<E> escalationType)
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.
-
-