org.axonframework.eventhandling
Interface EventBusTerminal

All Known Implementing Classes:
SpringAMQPTerminal

public interface EventBusTerminal

Interface describing a mechanism that connects Event Bus clusters. The terminal is responsible for delivering published Events with all of the clusters available in the Event Bus (either locally, or remotely).

Terminals are typically bound to a single Event Bus instance, but may be aware that multiple instances exist in order to form a bridge between these Event Buses.

Since:
1.2
Author:
Allard Buijze

Method Summary
 void onClusterCreated(Cluster cluster)
          Invoked when an Event Listener has been assigned to a cluster that was not yet known to the Event Bus.
 void publish(EventMessage... events)
          Publishes the given events to all clusters on the Event Bus.
 

Method Detail

publish

void publish(EventMessage... events)
Publishes the given events to all clusters on the Event Bus. The terminal is responsible for the delivery process, albeit local or remote.

Parameters:
events - the collections of events to publish

onClusterCreated

void onClusterCreated(Cluster cluster)
Invoked when an Event Listener has been assigned to a cluster that was not yet known to the Event Bus. This method is invoked only once for each cluster that was assigned an Event Listener. Subsequent Event Listeners are added to the cluster. Cluster remain "live" when all event listeners have been removed from them.

Parameters:
cluster - the newly created cluster


Copyright © 2010-2016. All Rights Reserved.