*/
private boolean pushWarningEmitted = false;
+ /**
+ * Has {@link #init()} been run?
+ */
+ private boolean initialized = false;
+
/**
* Creates a new vaadin service based on a deployment configuration
*
List<RequestHandler> handlers = createRequestHandlers();
Collections.reverse(handlers);
requestHandlers = Collections.unmodifiableCollection(handlers);
+
+ initialized = true;
}
/**
* The response
*/
public void requestStart(VaadinRequest request, VaadinResponse response) {
+ if (!initialized) {
+ throw new IllegalStateException(
+ "Can not process requests before init() has been called");
+ }
setCurrentInstances(request, response);
request.setAttribute(REQUEST_START_TIME_ATTRIBUTE, System.nanoTime());
}