|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.stuffthathappens.classbus.SyncDeliveryStrategy
public class SyncDeliveryStrategy
Synchronous event delivery. Sends events on the same thread as the code
invoking EventService.publish(String, Object).
| Constructor Summary | |
|---|---|
SyncDeliveryStrategy()
|
|
| Method Summary | ||
|---|---|---|
|
publishTo(java.lang.Iterable<EventSubscriber<T>> subscribers,
T event,
DeliveryCompleteCallback<T> callback)
Iterate over the given collection of subscribers, calling EventSubscriber.onEvent(Object) on each subscriber. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SyncDeliveryStrategy()
| Method Detail |
|---|
public <T> void publishTo(java.lang.Iterable<EventSubscriber<T>> subscribers,
T event,
DeliveryCompleteCallback<T> callback)
DeliveryStrategyEventSubscriber.onEvent(Object) on each subscriber.
This may spawn a new thread, depending on the implementation.
The callback is optional. If null, it is ignored.
publishTo in interface DeliveryStrategysubscribers - the subscribers to notify.event - the object to send.callback - an optional callback to notify upon completion.EventSubscriber.onEvent(Object)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||