org.springframework.data.mapping.callback

## Interface ReactiveEntityCallbacks

    public interface ReactiveEntityCallbacks

Interface to be implemented by objects that can manage a number of `EntityCallback` objects and invoke these with a specific entity.

Since:
  2.2
Author:
  Christoph Strobl
See Also:
  `EntityCallback`

### Method Summary

All Methods Static Methods Instance Methods Abstract Methods Default Methods
`void` `addEntityCallback(EntityCallback<?> callback)` Add the given `callback` using generic type argument detection for identification of supported types.
`<T> reactor.core.publisher.Mono<T>` `callback(Class<? extends EntityCallback> callbackType, T entity, Object... args)` On `subscribe` invoke the matching `entity callbacks` with given arguments.
`static ReactiveEntityCallbacks` `create()` Obtain a new `ReactiveEntityCallbacks` instance.
`static ReactiveEntityCallbacks` `create(BeanFactory beanFactory)` Obtain a new `ReactiveEntityCallbacks` instance.
`static ReactiveEntityCallbacks` `create(EntityCallback<?>... callbacks)` Create a new `ReactiveEntityCallbacks` instance with given `callbacks`.

### Method Detail

#### addEntityCallback

    void addEntityCallback(EntityCallback<?> callback)

Add the given `callback` using generic type argument detection for identification of supported types.

Parameters:
  `callback` - must not be null.
Throws:
  `IllegalArgumentException` - if the required argument is null.

#### callback

    <T> reactor.core.publisher.Mono<T> callback(Class<? extends EntityCallback> callbackType,
                                                T entity,
                                                Object... args)

On `subscribe` invoke the matching `entity callbacks` with given arguments.

Type Parameters:
  `T` - Entity type.
Parameters:
  `callbackType` - must not be null.
  `entity` - must not be null.
  `args` - optional arguments.
Returns:
  a `Mono` emitting the result after invoking the callbacks.
Throws:
  `IllegalArgumentException` - if a required argument is null.

#### create

    static ReactiveEntityCallbacks create(EntityCallback<?>... callbacks)

Create a new `ReactiveEntityCallbacks` instance with given `callbacks`.
The provided `callbacks` are immediately `added`.

#### create

    static ReactiveEntityCallbacks create()

Obtain a new `ReactiveEntityCallbacks` instance.
Use `addEntityCallback(EntityCallback)` to register callbacks manually.

#### create

    static ReactiveEntityCallbacks create(BeanFactory beanFactory)

Obtain a new `ReactiveEntityCallbacks` instance.

`callbacks` are pre loaded from the given `BeanFactory`.
Use `addEntityCallback(EntityCallback)` to register additional callbacks manually.

Parameters:
  `beanFactory` - must not be null.
Throws:
  `IllegalArgumentException` - if a required argument is null.