Example usage for com.vaadin.server VaadinSession getRequestHandlers

List of usage examples for com.vaadin.server VaadinSession getRequestHandlers

Introduction

In this page you can find the example usage for com.vaadin.server VaadinSession getRequestHandlers.

Prototype

public Collection<RequestHandler> getRequestHandlers() 

Source Link

Document

Gets the request handlers that are registered to the session.

Usage

From source file:pl.exsio.plupload.PluploadReceiver.java

License:Open Source License

public static PluploadReceiver getInstance() {
    VaadinSession session = VaadinSession.getCurrent();
    for (RequestHandler handler : session.getRequestHandlers()) {
        if (handler instanceof PluploadReceiver) {
            return (PluploadReceiver) handler;
        }/*from ww w.j  a v a2  s . c om*/
    }

    PluploadReceiver receiver = new PluploadReceiver();
    session.addRequestHandler(receiver);
    return receiver;
}