public class CompositeService extends Object implements Service
name: my_composite
routes:
- service: my_service
events:
- 'CREATE'
- 'READ'
As shown in the configuration example above, the events 'CREATE' and 'READ' are dispatched to
'my_service' when they are emitted on 'my_composite'. Also if a handler registration
for these events is created on 'my_composite' the registration is delegated to 'my_service'.| Constructor and Description |
|---|
CompositeService(CdsProperties.Composite.CompositeServiceConfig config,
CdsRuntime runtime) |
| Modifier and Type | Method and Description |
|---|---|
void |
after(EventPredicate matcher,
Handler handler) |
void |
after(String[] events,
String[] entities,
int order,
Handler handler) |
void |
before(EventPredicate matcher,
Handler handler) |
void |
before(String[] events,
String[] entities,
int order,
Handler handler) |
void |
emit(EventContext context) |
String |
getName() |
void |
on(EventPredicate matcher,
Handler handler) |
void |
on(String[] events,
String[] entities,
int order,
Handler handler) |
public CompositeService(CdsProperties.Composite.CompositeServiceConfig config, CdsRuntime runtime)
public void on(EventPredicate matcher, Handler handler)
public void before(EventPredicate matcher, Handler handler)
public void after(EventPredicate matcher, Handler handler)
public void emit(EventContext context)
Copyright © 2022. All rights reserved.