public interface EntityCallbacks
EntityCallback
objects and invoke these
with a specific entity.EntityCallback
Modifier and Type | Method and Description |
---|---|
void |
addEntityCallback(EntityCallback<?> callback)
Add the given
callback using generic type argument detection for identification of supported
types. |
<T> T |
callback(Class<? extends EntityCallback> callbackType,
T entity,
Object... args)
Invoke matching
entity callbacks with given arguments. |
static EntityCallbacks |
create()
Obtain a new
EntityCallbacks instance. |
static EntityCallbacks |
create(BeanFactory beanFactory)
Obtain a new
EntityCallbacks instance. |
static EntityCallbacks |
create(EntityCallback<?>... callbacks)
Create a new
EntityCallbacks instance with given callbacks . |
void addEntityCallback(EntityCallback<?> callback)
callback
using generic type argument detection for identification of supported
types.callback
- must not be null.IllegalArgumentException
- if the required argument is null.<T> T callback(Class<? extends EntityCallback> callbackType, T entity, Object... args)
entity callbacks
with given arguments.T
- Entity type.callbackType
- must not be null.entity
- must not be null.args
- optional arguments.IllegalArgumentException
- if a required argument is null.static EntityCallbacks create(EntityCallback<?>... callbacks)
EntityCallbacks
instance with given callbacks
. callbacks
are immediately added
.static EntityCallbacks create()
EntityCallbacks
instance. addEntityCallback(EntityCallback)
to register callbacks manually.static EntityCallbacks create(BeanFactory beanFactory)
EntityCallbacks
instance.
callbacks
are pre loaded from the given BeanFactory
.
Use addEntityCallback(EntityCallback)
to register additional callbacks manually.
beanFactory
- must not be null.IllegalArgumentException
- if a required argument is null.Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.