org.gradle.api.plugins.jetty
Class AbstractJettyRunTask
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.gradle.api.internal.ConventionTask
org.gradle.api.plugins.jetty.AbstractJettyRunTask
- All Implemented Interfaces:
- Comparable<Task>, org.gradle.api.internal.DynamicObjectAware, org.gradle.api.internal.IConventionAware, org.gradle.api.internal.TaskInternal, Task, org.gradle.util.Configurable<Task>
- Direct Known Subclasses:
- AbstractJettyRunWarTask, JettyRun
public abstract class AbstractJettyRunTask
- extends org.gradle.api.internal.ConventionTask
|
Field Summary |
protected Thread |
consoleScanner
A scanner to check ENTER hits on the console |
static String |
PORT_SYSPROPERTY
|
protected String |
reload
reload can be set to either 'automatic' or 'manual' if 'manual' then the context can be reloaded by a
linefeed in the console if 'automatic' then traditional reloading on changed files is enabled. |
protected ArrayList |
scannerListeners
List of Listeners for the scanner |
| Methods inherited from class org.gradle.api.internal.ConventionTask |
conventionMapping, getConventionMapping, setConventionMapping |
| Methods inherited from class org.gradle.api.internal.AbstractTask |
captureStandardOutput, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, disableStandardOutputCapture, doFirst, doFirst, doLast, doLast, equals, execute, getActions, getAdditionalProperties, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDidWork, getDynamicObjectHelper, getEnabled, getExecuter, getGroup, getInputs, getLogger, getLogging, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getStandardOutputCapture, getState, getTaskDependencies, getTemporaryDir, hashCode, hasProperty, injectIntoNewInstance, isEnabled, leftShift, onlyIf, onlyIf, property, setActions, setConvention, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setGroup, setName, setOnlyIf, setOnlyIf, setProject, setProperty, toString |
| Methods inherited from interface org.gradle.api.Task |
captureStandardOutput, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, disableStandardOutputCapture, doFirst, doFirst, doLast, doLast, getActions, getAnt, getConvention, getDependsOn, getDescription, getDidWork, getEnabled, getGroup, getInputs, getLogger, getLogging, getName, getOutputs, getPath, getProject, getState, getTaskDependencies, getTemporaryDir, hasProperty, leftShift, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setEnabled, setGroup, setOnlyIf, setOnlyIf, setProperty |
reload
protected String reload
- reload can be set to either 'automatic' or 'manual' if 'manual' then the context can be reloaded by a
linefeed in the console if 'automatic' then traditional reloading on changed files is enabled.
scannerListeners
protected ArrayList scannerListeners
- List of Listeners for the scanner
consoleScanner
protected Thread consoleScanner
- A scanner to check ENTER hits on the console
PORT_SYSPROPERTY
public static final String PORT_SYSPROPERTY
- See Also:
- Constant Field Values
AbstractJettyRunTask
public AbstractJettyRunTask()
validateConfiguration
public abstract void validateConfiguration()
configureScanner
public abstract void configureScanner()
applyJettyXml
public abstract void applyJettyXml()
throws Exception
- Throws:
Exception
createServer
public abstract org.gradle.api.plugins.jetty.internal.JettyPluginServer createServer()
throws Exception
- create a proxy that wraps a particular jetty version Server object
- Returns:
- The Jetty Plugin Server
- Throws:
Exception
finishConfigurationBeforeStart
public abstract void finishConfigurationBeforeStart()
throws Exception
- Throws:
Exception
start
protected void start()
getServer
public org.gradle.api.plugins.jetty.internal.JettyPluginServer getServer()
setServer
public void setServer(org.gradle.api.plugins.jetty.internal.JettyPluginServer server)
setScannerListeners
public void setScannerListeners(ArrayList listeners)
getScannerListeners
public ArrayList getScannerListeners()
getScanner
public org.mortbay.util.Scanner getScanner()
startJetty
public void startJetty()
startJettyInternal
public void startJettyInternal()
restartWebApp
public abstract void restartWebApp(boolean reconfigureScanner)
throws Exception
- Throws:
Exception
configureWebApplication
public void configureWebApplication()
throws Exception
- Subclasses should invoke this to setup basic info on the webapp
- Throws:
Exception
startConsoleScanner
protected void startConsoleScanner()
- Run a thread that monitors the console input to detect ENTER hits.
findJettyWebXmlFile
public File findJettyWebXmlFile(File webInfDir)
- Try and find a jetty-web.xml file, using some historical naming conventions if necessary.
- Returns:
- File object to the location of the jetty-web.xml
getWebDefaultXml
public File getWebDefaultXml()
setWebDefaultXml
public void setWebDefaultXml(File webDefaultXml)
getOverrideWebXml
public File getOverrideWebXml()
setOverrideWebXml
public void setOverrideWebXml(File overrideWebXml)
getScanIntervalSeconds
public int getScanIntervalSeconds()
setScanIntervalSeconds
public void setScanIntervalSeconds(int scanIntervalSeconds)
getContextPath
public String getContextPath()
setContextPath
public void setContextPath(String contextPath)
getWebAppConfig
public org.gradle.api.plugins.jetty.internal.JettyPluginWebAppContext getWebAppConfig()
setWebAppConfig
public void setWebAppConfig(org.gradle.api.plugins.jetty.internal.JettyPluginWebAppContext webAppConfig)
getReload
public String getReload()
setReload
public void setReload(String reload)
getJettyConfig
public File getJettyConfig()
setJettyConfig
public void setJettyConfig(File jettyConfig)
getStopPort
public Integer getStopPort()
setStopPort
public void setStopPort(Integer stopPort)
getStopKey
public String getStopKey()
setStopKey
public void setStopKey(String stopKey)
isDaemon
public boolean isDaemon()
setDaemon
public void setDaemon(boolean daemon)
getHttpPort
public Integer getHttpPort()
setHttpPort
public void setHttpPort(Integer httpPort)
getConnectors
public org.mortbay.jetty.Connector[] getConnectors()
setConnectors
public void setConnectors(org.mortbay.jetty.Connector[] connectors)
getUserRealms
public org.mortbay.jetty.security.UserRealm[] getUserRealms()
setUserRealms
public void setUserRealms(org.mortbay.jetty.security.UserRealm[] userRealms)
getRequestLog
public org.mortbay.jetty.RequestLog getRequestLog()
setRequestLog
public void setRequestLog(org.mortbay.jetty.RequestLog requestLog)
getAdditionalRuntimeJars
public Iterable<File> getAdditionalRuntimeJars()
setAdditionalRuntimeJars
public void setAdditionalRuntimeJars(Iterable<File> additionalRuntimeJars)