Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#38 Completed the app hot reload/restart process.
- Loading branch information
1 parent
c8157ff
commit 1b2aa34
Showing
7 changed files
with
155 additions
and
94 deletions.
There are no files selected for viewing
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
28 changes: 28 additions & 0 deletions
28
rapidoid-web/src/main/java/org/rapidoid/web/AppRestartProcessor.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 | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,28 @@ | |||
package org.rapidoid.web; | |||
|
|||
import org.rapidoid.annotation.Authors; | |||
import org.rapidoid.annotation.Since; | |||
import org.rapidoid.data.Range; | |||
import org.rapidoid.data.Ranges; | |||
import org.rapidoid.http.processor.AbstractHttpProcessor; | |||
import org.rapidoid.http.processor.HttpProcessor; | |||
import org.rapidoid.net.abstracts.Channel; | |||
|
|||
@Authors("Nikolche Mihajlovski") | |||
@Since("5.1.0") | |||
public class AppRestartProcessor extends AbstractHttpProcessor { | |||
|
|||
public AppRestartProcessor(Setup setup, HttpProcessor next) { | |||
super(next); | |||
} | |||
|
|||
@Override | |||
public void request(Channel channel, boolean isGet, boolean isKeepAlive, Range body, | |||
Range verb, Range uri, Range path, Range query, Range protocol, Ranges headers) { | |||
|
|||
Setup.restartIfDirty(); | |||
|
|||
next.request(channel, isGet, isKeepAlive, body, verb, uri, path, query, protocol, headers); | |||
} | |||
|
|||
} |
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
Oops, something went wrong.