Example usage for com.vaadin.client ApplicationConnection addHandler

List of usage examples for com.vaadin.client ApplicationConnection addHandler

Introduction

In this page you can find the example usage for com.vaadin.client ApplicationConnection addHandler.

Prototype

public <H extends EventHandler> HandlerRegistration addHandler(GwtEvent.Type<H> type, H handler) 

Source Link

Usage

From source file:com.wcs.vaadin.userinactivity.client.UserInactivityConnector.java

License:Apache License

@Override
protected void extend(ServerConnector target) {
    ApplicationConnection connection = target.getConnection();
    connection.addHandler(RequestStartingEvent.TYPE, this);
    connection.addHandler(ApplicationStoppedEvent.TYPE, this);
    Event.addNativePreviewHandler(this);
    registerRpc(UserInactivityClientRpc.class, new UserInactivityClientRpc() {

        @Override// w  ww .j  a va  2 s .  com
        public void scheduleTimeout(int timeoutSeconds) {
            schedule(timeoutSeconds);
        }
    });
}