Search in sources :

Example 1 with StreamRequestHandler

use of com.vaadin.flow.server.communication.StreamRequestHandler in project flow by vaadin.

the class VaadinService method createRequestHandlers.

/**
 * Called during initialization to add the request handlers for the service.
 * Note that the returned list will be reversed so the last handler will be
 * called first. This enables overriding this method and using add on the
 * returned list to add a custom request handler which overrides any
 * predefined handler.
 *
 * @return The list of request handlers used by this service.
 * @throws ServiceException
 *             if a problem occurs when creating the request handlers
 */
protected List<RequestHandler> createRequestHandlers() throws ServiceException {
    List<RequestHandler> handlers = new ArrayList<>();
    handlers.add(new FaviconHandler());
    handlers.add(new SessionRequestHandler());
    handlers.add(new HeartbeatHandler());
    handlers.add(new UidlRequestHandler());
    handlers.add(new UnsupportedBrowserHandler());
    handlers.add(new StreamRequestHandler());
    return handlers;
}
Also used : UidlRequestHandler(com.vaadin.flow.server.communication.UidlRequestHandler) StreamRequestHandler(com.vaadin.flow.server.communication.StreamRequestHandler) StreamRequestHandler(com.vaadin.flow.server.communication.StreamRequestHandler) UidlRequestHandler(com.vaadin.flow.server.communication.UidlRequestHandler) SessionRequestHandler(com.vaadin.flow.server.communication.SessionRequestHandler) FaviconHandler(com.vaadin.flow.server.communication.FaviconHandler) HeartbeatHandler(com.vaadin.flow.server.communication.HeartbeatHandler) SessionRequestHandler(com.vaadin.flow.server.communication.SessionRequestHandler) CopyOnWriteArrayList(java.util.concurrent.CopyOnWriteArrayList) ArrayList(java.util.ArrayList)

Aggregations

FaviconHandler (com.vaadin.flow.server.communication.FaviconHandler)1 HeartbeatHandler (com.vaadin.flow.server.communication.HeartbeatHandler)1 SessionRequestHandler (com.vaadin.flow.server.communication.SessionRequestHandler)1 StreamRequestHandler (com.vaadin.flow.server.communication.StreamRequestHandler)1 UidlRequestHandler (com.vaadin.flow.server.communication.UidlRequestHandler)1 ArrayList (java.util.ArrayList)1 CopyOnWriteArrayList (java.util.concurrent.CopyOnWriteArrayList)1