Package io.micronaut.inject
Interface DisposableBeanDefinition<T>
-
- Type Parameters:
T
- The bean definition type
- All Superinterfaces:
io.micronaut.core.annotation.AnnotationMetadata
,io.micronaut.core.annotation.AnnotationMetadataDelegate
,io.micronaut.core.annotation.AnnotationMetadataProvider
,io.micronaut.core.annotation.AnnotationSource
,io.micronaut.core.type.ArgumentCoercible<T>
,BeanContextConditional
,BeanDefinition<T>
,BeanType<T>
,io.micronaut.core.naming.Named
@Internal public interface DisposableBeanDefinition<T> extends BeanDefinition<T>
A bean definition that provides disposing hooks normally in the form ofPreDestroy
annotated methods.- Since:
- 1.0
- See Also:
PreDestroy
-
-
Field Summary
-
Fields inherited from interface io.micronaut.core.annotation.AnnotationMetadata
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER
-
Fields inherited from interface io.micronaut.inject.BeanDefinition
NAMED_ATTRIBUTE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default T
dispose(BeanContext context, T bean)
Disposes of the bean definition by executing allPreDestroy
hooks.T
dispose(BeanResolutionContext resolutionContext, BeanContext context, T bean)
Disposes of the bean definition by executing allPreDestroy
hooks.-
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadata
getAnnotationValuesByName, getAnnotationValuesByStereotype, getDeclaredAnnotationValuesByName, getValues, hasDeclaredStereotype, isAnnotationPresent, isDeclaredAnnotationPresent
-
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataDelegate
booleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, doubleValue, doubleValue, doubleValue, enumValue, enumValue, enumValue, enumValue, enumValues, enumValues, enumValues, enumValues, findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, findRepeatableAnnotation, findRepeatableAnnotation, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, getDeclaredMetadata, getDeclaredStereotypeAnnotationNames, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getStereotypeAnnotationNames, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, hasPropertyExpressions, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, hasStereotype, intValue, intValue, intValue, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isFalse, isFalse, isPresent, isPresent, isRepeatableAnnotation, isRepeatableAnnotation, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, stringValues, stringValues, synthesize, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
-
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
getAnnotationMetadata
-
Methods inherited from interface io.micronaut.inject.BeanContextConditional
isEnabled, isEnabled
-
Methods inherited from interface io.micronaut.inject.BeanDefinition
asArgument, findMethod, findPossibleMethods, getBeanType, getConstructor, getContainerElement, getDeclaredQualifier, getDeclaringType, getExecutableMethods, getInjectedFields, getInjectedMethods, getName, getPostConstructMethods, getPreDestroyMethods, getRequiredComponents, getRequiredMethod, getScope, getScopeName, getTypeArguments, getTypeArguments, getTypeArguments, getTypeParameters, getTypeParameters, inject, inject, isAbstract, isCandidateBean, isIterable, isProvided, isProxy, isSingleton, resolveDynamicQualifier
-
Methods inherited from interface io.micronaut.inject.BeanType
getExposedTypes, isContainerType, isPrimary, requiresMethodProcessing
-
-
-
-
Method Detail
-
dispose
default T dispose(BeanContext context, T bean)
Disposes of the bean definition by executing allPreDestroy
hooks.- Parameters:
context
- The bean contextbean
- The bean- Returns:
- The bean instance
-
dispose
T dispose(BeanResolutionContext resolutionContext, BeanContext context, T bean)
Disposes of the bean definition by executing allPreDestroy
hooks.- Parameters:
resolutionContext
- The bean resolution contextcontext
- The bean contextbean
- The bean- Returns:
- The bean instance
-
-