The timeoutInterval variable needs to be part of per-UI state for the
code to work correctly. Storing it in a servlet-global MetadataWriter
instance is both semantically wrong and a race condition.
Also, the test currently throws NPE if assertions are enabled.
This reverts commit f595d05795.
Change-Id: Ia6d1383b2c112b86ce60c75a3ebb9f10da545d4a
Removing UidlRequestHandler.postHandleRequest should not affect
backwards compatibility as UidlRequestHandler is a new class.
Change-Id: I7f3753b1c3d37afcc973d3e5571c0d1708177bf9
Add isPushRequest() check to VaadinServletService.isOtherRequest() (#11556)
* Prevents VaadinService from creating a new session for push requests
* Also unify behaviour when UI is not found in session (log and return)
Change-Id: Iea0e4ae5e0b5fa81404f688aa6d92d16343ebd26
* Asynchronous bidirectional communication
* Use Atmosphere as a backend
* Use websockets if available, fallback to HTTP streaming
* Push mode (disabled, manual, automatic)
* Configurable via servlet parameter pushMode
* Disabled: The default; regular AJAX communication
* Manual: Need explicit UI.push() call
* Automatic: push all UIs in session when lock released
* UI.push()
* Push pending state and RPC to client asynchronously
* Must hold session lock when invoking
Change-Id: Idb5978ac81f7ff1e66665df4e3f96e29e4c419d4
Write JSON response to a buffer instead of directly to the output stream (#11424, #11156)
* Allows safe abortion of JSON output and writing a critical notification instead
* Unifies json writing for init request and other UIDL requests
* Ensures headers are written before the response
Change-Id: Idd8acb672aac8716b727701d6c057bbe58f50993
Refactored how all requests are handled by VaadinServlet and VaadinPortlet (#11192)
* Handling is now based on a list of RequestHandlers in VaadinService
* Request handling logic has been moved to VaadinService
* Users can customize the list by adding own (service level) request handlers
* For users specific request handlers you can still use the request handlers in VaadinSession
* Deprecated RequestType - all handlers are given the opportunity to handle a request until one of them chooses to handle it. RequestType makes no sense as it does not tell which handler will handle the request.
* Removed serveStaticResource which has never been used
Change-Id: Ia7d088535e46430ca8adf631d3f1dd944b9d51e2
Fixed locking in RequestHandlers and documented that RequestHandlers are called without locking (#9945)
* Added SynchronizedRequestHandler which locks the session for the whole request
* Made request handlers which do not do do heavy IO implement SynchronizedRequestHandler
* Fixed locking for GlobalResourceHandler, ConnectorResourceHandler, PublishedFileHandler
Change-Id: I0e7b442a9392828f1930685f194dc4f898d0f525
Removed CommunicationManager and PortletCommunicationManager
* Moved AbstractCommunicationManager abstract methods
getThemeResourceAsStream and createBootstrapHandler to VaadinService
* Made ACM non-abstract and renamed to LegacyCommunicationManager
* Lifted anonymous inner BootstrapHandler subclasses into named public classes
Change-Id: I31739ce8a506d572e75ca8cd5509be215e01693d
* Move UIDL writing from AbstractCommunicationManager to UidlWriter
* Move request handling from ACM to RequestHandlers
* Move server RPC message handling to ServerRpcHandler
* Move portlet event notifications to PortletListenerNotifier (a RequestHandler)
* Communication handlers reside in c.v.server.communication
Change-Id: I087e923dbdf88c6b3fcaafbdb7f685d9d3dad0c1