Event<T,R> Interface

Type Parameters

T

the event source object type

R

the event argument type

public interface Event<T,R>

This interface provides a simple eventing model. Events produce items consumed by EventListeners. The flow of event items is controlled by the EventSubscription.

Method Summary

Modifier and Type Method and Description
EventSubscription subscribe(EventListener<? super T, ? super R> listener)

This method subscribes the given listener to receive items.

Method Details

subscribe

public EventSubscription subscribe(EventListener listener)

This method subscribes the given listener to receive items.

Parameters:

listener

Returns:

The subcription for the event

Applies to