Example usage for com.vaadin.client ServerConnector getConnection

List of usage examples for com.vaadin.client ServerConnector getConnection

Introduction

In this page you can find the example usage for com.vaadin.client ServerConnector getConnection.

Prototype

public ApplicationConnection getConnection();

Source Link

Document

Gets ApplicationConnection instance that created this connector.

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//from  w  ww.ja v a2 s. co m
        public void scheduleTimeout(int timeoutSeconds) {
            schedule(timeoutSeconds);
        }
    });
}