CDI observer for GWT / GIN
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

Kaitiro (Maori for "observer") brings the observer feature from CDI (JSR-299/JSR-330) to GWT.

Using CDI you can easily define custom events / listeners:

public class HelloEvent { 
    private final String message; 

    public HelloEvent(String message) { 
        this.message = message; 

    public String getMessage() { 
        return message; 

public class HelloMessenger { 
    @Inject Event<HelloEvent> event; 

    public void hello() { HelloEvent("Hi there " + System.currentTimeMillis())); 

public class HelloListener { 
    public void listenToHello(@Observes HelloEvent helloEvent) { 
        System.out.println("HelloEvent: " + helloEvent); 

Kaitiro aims to bring this programming model to GWT / GIN. For a reasonable implementation Kaitiro needs to participate in GINs dependency injection mechanism. There's an ongoing discussion to implement some kind of GinExtensions. Kaitiro would use such an extension to generate the necessary code for GwtEvents and EventHandlers that integrate nicley with the new GWT EventBus.

For more details about the planned GIN extensions see

Kaitiro is currently in the design phase. Any ideas, suggestions and comments are welcome!