Class ServerProxyImpl
java.lang.Object
org.eclipse.jetty.ant.ServerProxyImpl
- All Implemented Interfaces:
ServerProxy
A proxy class for interaction with Jetty server object. Used to have some
level of abstraction over standard Jetty classes.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classWebAppScannerListener Handle notifications that files we are interested in have changed during execution. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanList of connectors.private ContextHandlersother contexts to deployprivate ContextHandlerCollectionCollection of context handlers (web application contexts).private booleanwait for all jetty threads to exit or continueprivate FileLocation of jetty.xml file.private List<LoginService> User realms.private RequestLogRequest logger.private intscan interval for changed filesprivate ServerProxied Jetty server object.private Stringsecurity key for stop commandprivate intport to listen for stop commandprivate FileTemporary files directory.private List<AntWebAppContext> List of added web applications. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddWebApplication(AntWebAppContext webApp) Adds a new web application to this server.private voidApplies jetty.xml configuration to the Jetty server instance.private voidConfigures Jetty server before adding any web applications to it.private voidprivate voidintintbooleanisDaemon()voidsetConnectors(List<Connector> connectors) voidsetContextHandlers(ContextHandlers contextHandlers) voidsetDaemon(boolean daemon) voidsetJettyXml(File jettyXml) voidsetLoginServices(List<LoginService> loginServices) voidsetRequestLog(RequestLog requestLog) voidsetScanIntervalSecs(int scanIntervalSecs) voidsetStopKey(String stopKey) voidsetStopPort(int stopPort) voidsetTempDirectory(File tempDirectory) voidsetWebApplications(List<AntWebAppContext> webApplications) voidstart()Starts this server.private voidStarts web applications' scanners.
-
Field Details
-
server
Proxied Jetty server object. -
tempDirectory
Temporary files directory. -
contexts
Collection of context handlers (web application contexts). -
jettyXml
Location of jetty.xml file. -
connectors
-
requestLog
Request logger. -
loginServices
User realms. -
webApplications
List of added web applications. -
contextHandlers
other contexts to deploy -
scanIntervalSecs
private int scanIntervalSecsscan interval for changed files -
stopPort
private int stopPortport to listen for stop command -
stopKey
security key for stop command -
daemon
private boolean daemonwait for all jetty threads to exit or continue -
configured
private boolean configured
-
-
Constructor Details
-
ServerProxyImpl
public ServerProxyImpl()Default constructor. Creates a new Jetty server with a standard connector listening on a given port.
-
-
Method Details
-
addWebApplication
Description copied from interface:ServerProxyAdds a new web application to this server.- Specified by:
addWebApplicationin interfaceServerProxy- Parameters:
webApp- a AntWebAppContext object.
-
getStopPort
public int getStopPort() -
setStopPort
public void setStopPort(int stopPort) -
getStopKey
-
setStopKey
-
getJettyXml
-
setJettyXml
-
getConnectors
-
setConnectors
-
getRequestLog
-
setRequestLog
-
getLoginServices
-
setLoginServices
-
getWebApplications
-
setWebApplications
-
getTempDirectory
-
setTempDirectory
-
start
public void start()Description copied from interface:ServerProxyStarts this server.- Specified by:
startin interfaceServerProxy- See Also:
-
getProxiedObject
- Specified by:
getProxiedObjectin interfaceServerProxy- See Also:
-
isDaemon
public boolean isDaemon()- Returns:
- the daemon
-
setDaemon
public void setDaemon(boolean daemon) - Parameters:
daemon- the daemon to set
-
getContextHandlers
- Returns:
- the contextHandlers
-
setContextHandlers
- Parameters:
contextHandlers- the contextHandlers to set
-
getScanIntervalSecs
public int getScanIntervalSecs() -
setScanIntervalSecs
public void setScanIntervalSecs(int scanIntervalSecs) -
configure
private void configure()Configures Jetty server before adding any web applications to it. -
configureHandlers
private void configureHandlers() -
applyJettyXml
private void applyJettyXml()Applies jetty.xml configuration to the Jetty server instance. -
startScanners
-
configureWebApps
private void configureWebApps()
-