public class DevShellSPIAdapter extends Object implements DevShellSPI
Extend and override doRebuild()
method to your will.
Note that this is the werval HttpServer responsibility to trigger rebuilds.
DevShellSPI.SourceChangeListener, DevShellSPI.SourceWatch, DevShellSPI.SourceWatcher
Modifier | Constructor and Description |
---|---|
protected |
DevShellSPIAdapter(URL[] applicationSources, URL[] applicationClassPath, URL[] runtimeClassPath, Set<File> toWatch, DevShellSPI.SourceWatcher watcher, boolean initialSourceChanged) |
Modifier and Type | Method and Description |
---|---|
URL[] |
applicationClassPath()
Application Classpath.
|
protected void |
doRebuild()
No operation.
|
protected void |
doStop()
No operation.
|
boolean |
isSourceChanged() |
void |
rebuild()
Rebuild the Application sources.
|
URL[] |
runtimeClassPath()
Runtime Classpath.
|
String |
sourceURL(String packageName, String fileName, int lineNumber)
Build Application source file URL if it exists.
|
void |
stop()
Stop.
|
public final URL[] applicationClassPath()
DevShellSPI
Typically build output directories.
applicationClassPath
in interface
DevShellSPI
public final URL[] runtimeClassPath()
DevShellSPI
Typically application dependencies, including Werval.
runtimeClassPath
in interface
DevShellSPI
public String sourceURL(String packageName, String fileName, int lineNumber)
DevShellSPI
sourceURL
in interface
DevShellSPI
packageName
- Package name
fileName
- File name
lineNumber
- Line number
public final boolean isSourceChanged()
isSourceChanged
in interface
DevShellSPI
DevShellSPI.rebuild()
, false otherwise
public final void rebuild() throws DevShellRebuildException
DevShellSPI
rebuild
in interface
DevShellSPI
DevShellRebuildException
- if something goes wrong, HttpServer implementation should use its
DevShellRebuildException.htmlErrorPage()
methods to get the payload to present to the user browser.
public final void stop()
DevShellSPI
stop
in interface
DevShellSPI
protected void doRebuild() throws DevShellRebuildException
DevShellRebuildException
- if rebuilding fails
DevShellSPI.rebuild()
protected void doStop()
DevShellSPI.stop()