-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Fire an event when all hotswap operations have completed (#20364)…
… (#20373) Co-authored-by: Artur <[email protected]>
- Loading branch information
1 parent
5a3a006
commit e4cc1b1
Showing
5 changed files
with
115 additions
and
0 deletions.
There are no files selected for viewing
66 changes: 66 additions & 0 deletions
66
flow-server/src/main/java/com/vaadin/flow/hotswap/HotswapCompleteEvent.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
* Copyright 2000-2024 Vaadin Ltd. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not | ||
* use this file except in compliance with the License. You may obtain a copy of | ||
* the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
* License for the specific language governing permissions and limitations under | ||
* the License. | ||
*/ | ||
|
||
package com.vaadin.flow.hotswap; | ||
|
||
import java.util.Set; | ||
|
||
import com.vaadin.flow.server.VaadinService; | ||
|
||
/* | ||
* Event fired when hotswap has been completed. | ||
*/ | ||
public class HotswapCompleteEvent { | ||
|
||
private final Set<Class<?>> classes; | ||
private final VaadinService vaadinService; | ||
private final boolean redefined; | ||
|
||
public HotswapCompleteEvent(VaadinService vaadinService, | ||
Set<Class<?>> classes, boolean redefined) { | ||
this.classes = classes; | ||
this.vaadinService = vaadinService; | ||
this.redefined = redefined; | ||
} | ||
|
||
/** | ||
* Gets the classes that were updated. | ||
* | ||
* @return the updated classes | ||
*/ | ||
public Set<Class<?>> getClasses() { | ||
return classes; | ||
} | ||
|
||
/** | ||
* Checks if the classes were redefined (as opposed to being new classes). | ||
* | ||
* @return {@literal true} if the classes have been redefined by hotswap | ||
*/ | ||
public boolean isRedefined() { | ||
return redefined; | ||
} | ||
|
||
/** | ||
* Gets the Vaadin service. | ||
* | ||
* @return the vaadin service | ||
*/ | ||
public VaadinService getService() { | ||
return vaadinService; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters