T
- the type of auxiliary context object that can be passed between
methods. Implementations can choose what type of data to supply as
it is passed around unchanged by the caller.public interface BeanLifecycleDecorator<T>
Modifier and Type | Interface and Description |
---|---|
static class |
BeanLifecycleDecorator.Context<T> |
Modifier and Type | Method and Description |
---|---|
Object |
decorateBean(Object bean,
BeanLifecycleDecorator.Context<T> context)
Optionally decorate and provide a new instance of a compatible bean for
the caller to use instead of the input.
|
BeanLifecycleDecorator.Context<T> |
decorateDestructionCallback(Runnable callback)
Optionally decorate the destruction callback provided, and also return
some context that can be used later by the
decorateBean(Object, Context) method. |
Object decorateBean(Object bean, BeanLifecycleDecorator.Context<T> context)
bean
- the bean to optionally decoratecontext
- the context as created by
decorateDestructionCallback(Runnable)
BeanLifecycleDecorator.Context<T> decorateDestructionCallback(Runnable callback)
decorateBean(Object, Context)
method.callback
- the destruction callback that will be used by the containerCopyright © 2017 Pivotal Software, Inc.. All rights reserved.