File tree Expand file tree Collapse file tree
flow-server/src/main/java/com/vaadin/flow/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2000-2022 Vaadin Ltd.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License"); you may not
5+ * use this file except in compliance with the License. You may obtain a copy of
6+ * the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13+ * License for the specific language governing permissions and limitations under
14+ * the License.
15+ */
16+ package com .vaadin .flow .internal ;
17+
18+ import com .vaadin .flow .server .VaadinService ;
19+
20+ /**
21+ * Creates a live reload instance by delegating to
22+ * {@link BrowserLiveReloadAccessor#getLiveReload(VaadinService)}
23+ * <p>
24+ * Class exists only for backwards compatibility with JRebel and HotswapAgent
25+ * plugins.
26+ *
27+ * @deprecated Use {@link BrowserLiveReloadAccessor} instead
28+ */
29+ @ Deprecated
30+ public class BrowserLiveReloadAccess {
31+
32+ /**
33+ * Returns a {@link BrowserLiveReload} instance for the given
34+ * {@code service}.
35+ * <p>
36+ * Returns {@code null} if production mode is enabled for the service.
37+ *
38+ * @param service
39+ * a service
40+ * @return a BrowserLiveReload instance or null for production mode
41+ */
42+ public BrowserLiveReload getLiveReload (VaadinService service ) {
43+ return BrowserLiveReloadAccessor .getLiveReloadFromService (service )
44+ .orElse (null );
45+ }
46+ }
You can’t perform that action at this time.
0 commit comments