Example usage for com.vaadin.server ServletPortletHelper isPushRequest

List of usage examples for com.vaadin.server ServletPortletHelper isPushRequest

Introduction

In this page you can find the example usage for com.vaadin.server ServletPortletHelper isPushRequest.

Prototype

public static boolean isPushRequest(VaadinRequest request) 

Source Link

Usage

From source file:com.github.mcollovati.vertx.vaadin.VertxVaadinService.java

License:Open Source License

@Override
protected List<RequestHandler> createRequestHandlers() throws ServiceException {
    List<RequestHandler> handlers = super.createRequestHandlers();
    handlers.add(0, new ServletBootstrapHandler());
    handlers.add(new ServletUIInitHandler());
    if (isAtmosphereAvailable()) {
        handlers.add((RequestHandler) (session, request, response) -> {
            if (!ServletPortletHelper.isPushRequest(request)) {
                return false;
            }//from  w ww .j a v  a  2s.co m
            if (request instanceof VertxVaadinRequest) {
                ((VertxVaadinRequest) request).getRoutingContext().next();
            }
            return true;
        });
    }
    return handlers;
}

From source file:com.github.mcollovati.vertx.vaadin.VertxVaadinService.java

License:Open Source License

private boolean isOtherRequest(VaadinRequest request) {
    // TODO This should be refactored in some way. It should not be
    // necessary to check all these types.
    return (!ServletPortletHelper.isAppRequest(request) && !ServletUIInitHandler.isUIInitRequest(request)
            && !ServletPortletHelper.isFileUploadRequest(request)
            && !ServletPortletHelper.isHeartbeatRequest(request)
            && !ServletPortletHelper.isPublishedFileRequest(request)
            && !ServletPortletHelper.isUIDLRequest(request) && !ServletPortletHelper.isPushRequest(request));
}