T
- The type of units to consume.public final class ConsumingBroadcaster<T extends Broadcastable> extends AbstractBroadcaster
Consumer
.next
Constructor and Description |
---|
ConsumingBroadcaster(Class<T> klass,
Consumer<T> consumer)
Creates a new broadcaster that matches units of the given class.
|
ConsumingBroadcaster(Class<T> klass,
Consumer<T> consumer,
Function<T,Boolean> customComparableLogic)
Creates a new broadcaster that matches units of the given class.
|
Modifier and Type | Method and Description |
---|---|
void |
broadcast(Broadcastable broadcastable)
Broadcasts the given event (syntax unit).
|
chain, chainBroadcast, cut, relay
public ConsumingBroadcaster(Class<T> klass, Consumer<T> consumer, Function<T,Boolean> customComparableLogic)
klass
- The type of unit to consume.consumer
- The consumer.customComparableLogic
- Additional logic function if return true then the consumer
will be called. If false, then it will not be called. This function
is used in conjunction with the klass
attribute.ConsumingBroadcaster(Class, Consumer)
public ConsumingBroadcaster(Class<T> klass, Consumer<T> consumer)
klass
- The type of unit to consume.consumer
- The consumer.ConsumingBroadcaster(Class, Consumer, Function)
public void broadcast(Broadcastable broadcastable)
Broadcaster
broadcastable
- The Broadcastable
syntax unit.Copyright (c) 2019, Salesforce.com, Inc. All rights reserved. Licensed under the BSD 3-Clause license. For full license text, see the LICENSE file in the repository.