public class ServerProxyImpl extends java.lang.Object implements ServerProxy
Modifier and Type | Class and Description |
---|---|
static class |
ServerProxyImpl.WebAppScannerListener
WebAppScannerListener
Handle notifications that files we are interested in have changed
during execution.
|
Modifier and Type | Field and Description |
---|---|
private boolean |
configured |
private java.util.List<Connector> |
connectors
List of connectors.
|
private ContextHandlers |
contextHandlers
other contexts to deploy
|
private ContextHandlerCollection |
contexts
Collection of context handlers (web application contexts).
|
private boolean |
daemon
wait for all jetty threads to exit or continue
|
private java.io.File |
jettyXml
Location of jetty.xml file.
|
private java.util.List<LoginService> |
loginServices
User realms.
|
private RequestLog |
requestLog
Request logger.
|
private int |
scanIntervalSecs
scan interval for changed files
|
private Server |
server
Proxied Jetty server object.
|
private java.lang.String |
stopKey
security key for stop command
|
private int |
stopPort
port to listen for stop command
|
private java.io.File |
tempDirectory
Temporary files directory.
|
private java.util.List<AntWebAppContext> |
webApplications
List of added web applications.
|
Constructor and Description |
---|
ServerProxyImpl()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addWebApplication(AntWebAppContext webApp)
Adds a new web application to this server.
|
private void |
applyJettyXml()
Applies jetty.xml configuration to the Jetty server instance.
|
private void |
configure()
Configures Jetty server before adding any web applications to it.
|
private void |
configureHandlers() |
private void |
configureWebApps() |
java.util.List<Connector> |
getConnectors() |
ContextHandlers |
getContextHandlers() |
java.io.File |
getJettyXml() |
java.util.List<LoginService> |
getLoginServices() |
java.lang.Object |
getProxiedObject() |
RequestLog |
getRequestLog() |
int |
getScanIntervalSecs() |
java.lang.String |
getStopKey() |
int |
getStopPort() |
java.io.File |
getTempDirectory() |
java.util.List<AntWebAppContext> |
getWebApplications() |
boolean |
isDaemon() |
void |
setConnectors(java.util.List<Connector> connectors) |
void |
setContextHandlers(ContextHandlers contextHandlers) |
void |
setDaemon(boolean daemon) |
void |
setJettyXml(java.io.File jettyXml) |
void |
setLoginServices(java.util.List<LoginService> loginServices) |
void |
setRequestLog(RequestLog requestLog) |
void |
setScanIntervalSecs(int scanIntervalSecs) |
void |
setStopKey(java.lang.String stopKey) |
void |
setStopPort(int stopPort) |
void |
setTempDirectory(java.io.File tempDirectory) |
void |
setWebApplications(java.util.List<AntWebAppContext> webApplications) |
void |
start()
Starts this server.
|
private void |
startScanners()
Starts web applications' scanners.
|
private Server server
private java.io.File tempDirectory
private ContextHandlerCollection contexts
private java.io.File jettyXml
private java.util.List<Connector> connectors
private RequestLog requestLog
private java.util.List<LoginService> loginServices
private java.util.List<AntWebAppContext> webApplications
private ContextHandlers contextHandlers
private int scanIntervalSecs
private int stopPort
private java.lang.String stopKey
private boolean daemon
private boolean configured
public ServerProxyImpl()
public void addWebApplication(AntWebAppContext webApp)
ServerProxy
addWebApplication
in interface ServerProxy
webApp
- a AntWebAppContext object.public int getStopPort()
public void setStopPort(int stopPort)
public java.lang.String getStopKey()
public void setStopKey(java.lang.String stopKey)
public java.io.File getJettyXml()
public void setJettyXml(java.io.File jettyXml)
public java.util.List<Connector> getConnectors()
public void setConnectors(java.util.List<Connector> connectors)
public RequestLog getRequestLog()
public void setRequestLog(RequestLog requestLog)
public java.util.List<LoginService> getLoginServices()
public void setLoginServices(java.util.List<LoginService> loginServices)
public java.util.List<AntWebAppContext> getWebApplications()
public void setWebApplications(java.util.List<AntWebAppContext> webApplications)
public java.io.File getTempDirectory()
public void setTempDirectory(java.io.File tempDirectory)
public void start()
ServerProxy
start
in interface ServerProxy
ServerProxy.start()
public java.lang.Object getProxiedObject()
getProxiedObject
in interface ServerProxy
ServerProxy.getProxiedObject()
public boolean isDaemon()
public void setDaemon(boolean daemon)
daemon
- the daemon to setpublic ContextHandlers getContextHandlers()
public void setContextHandlers(ContextHandlers contextHandlers)
contextHandlers
- the contextHandlers to setpublic int getScanIntervalSecs()
public void setScanIntervalSecs(int scanIntervalSecs)
private void configure()
private void configureHandlers()
private void applyJettyXml()
private void startScanners() throws java.lang.Exception
java.lang.Exception
private void configureWebApps()