public final class VisitingBroadcaster extends AbstractBroadcaster
next
Constructor and Description |
---|
VisitingBroadcaster()
Creates a new
VisitingBroadcaster . |
VisitingBroadcaster(Broadcaster broadcaster)
Creates a new
VisitingBroadcaster and calls AbstractBroadcaster.chain(Broadcaster) on this instance, passing in the
given Broadcaster . |
Modifier and Type | Method and Description |
---|---|
void |
broadcast(Broadcastable broadcastable)
Broadcasts the given event (syntax unit).
|
void |
visit(Broadcaster broadcaster,
Status status)
Calls
Broadcastable.propagateBroadcast(Broadcaster, Status) on the top unit using the given Broadcaster
and status. |
chain, chainBroadcast, cut, relay
public VisitingBroadcaster()
VisitingBroadcaster
.public VisitingBroadcaster(Broadcaster broadcaster)
VisitingBroadcaster
and calls AbstractBroadcaster.chain(Broadcaster)
on this instance, passing in the
given Broadcaster
.broadcaster
- Add this broadcaster to the end of the chain.public void broadcast(Broadcastable broadcastable)
Broadcaster
broadcastable
- The Broadcastable
syntax unit.public void visit(Broadcaster broadcaster, Status status)
Broadcastable.propagateBroadcast(Broadcaster, Status)
on the top unit using the given Broadcaster
and status.
Once this method is called the target unit is locked in so that subsequent calls will always propagate from the same starting point.
broadcaster
- Propagate with this broadcaster.status
- Only propagate the broadcast of units with this status.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.