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 aManagedFunctionEscalationTypeBuilder
to theManagedFunctionTypeBuilder
definition.java.lang.String
getFunctionName()
Obtains the name of theManagedFunction
.java.lang.reflect.Method
getMethod()
Obtains theMethod
.java.lang.annotation.Annotation[]
getMethodAnnotations()
Obtains theAnnotation
instances for theMethod
.java.lang.Class<?>
getReturnClass()
Obtains theClass
of theMethod
return.SourceContext
getSourceContext()
Obtains theSourceContext
.void
setTranslatedReturnClass(java.lang.Class<? super T> translatedReturnClass)
Overrides the returnClass
to the translated returnClass
.
-
-
-
Method Detail
-
getReturnClass
java.lang.Class<?> getReturnClass()
Obtains theClass
of theMethod
return.- Returns:
Class
of theMethod
return.
-
setTranslatedReturnClass
void setTranslatedReturnClass(java.lang.Class<? super T> translatedReturnClass)
Overrides the return
Class
to the translated returnClass
.Should this not be invoked, then the default
Method
returnClass
is used.- Parameters:
translatedReturnClass
- Translated returnClass
.
-
getMethodAnnotations
java.lang.annotation.Annotation[] getMethodAnnotations()
Obtains theAnnotation
instances for theMethod
.- Returns:
Annotation
instances 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
Class
may 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
ManagedFunctionEscalationTypeBuilder
to theManagedFunctionTypeBuilder
definition.It is possible the
MethodReturnTranslator
will throw anEscalation
. While this should be avoided, this allows registeringEscalation
for being handled.- Type Parameters:
E
-Escalation
type.- Parameters:
escalationType
- Type to be handled by anEscalationFlow
.- Returns:
ManagedFunctionEscalationTypeBuilder
to provide thetype definition
.
-
getSourceContext
SourceContext getSourceContext()
Obtains theSourceContext
.- Returns:
SourceContext
.
-
-