Class ServerProxyImpl

java.lang.Object
org.eclipse.jetty.ant.ServerProxyImpl
All Implemented Interfaces:
ServerProxy

public class ServerProxyImpl extends Object implements ServerProxy
A proxy class for interaction with Jetty server object. Used to have some level of abstraction over standard Jetty classes.
  • Field Details

    • server

      private Server server
      Proxied Jetty server object.
    • tempDirectory

      private File tempDirectory
      Temporary files directory.
    • contexts

      private ContextHandlerCollection contexts
      Collection of context handlers (web application contexts).
    • jettyXml

      private File jettyXml
      Location of jetty.xml file.
    • connectors

      private List<Connector> connectors
      List of connectors.
    • requestLog

      private RequestLog requestLog
      Request logger.
    • loginServices

      private List<LoginService> loginServices
      User realms.
    • webApplications

      private List<AntWebAppContext> webApplications
      List of added web applications.
    • contextHandlers

      private ContextHandlers contextHandlers
      other contexts to deploy
    • scanIntervalSecs

      private int scanIntervalSecs
      scan interval for changed files
    • stopPort

      private int stopPort
      port to listen for stop command
    • stopKey

      private String stopKey
      security key for stop command
    • daemon

      private boolean daemon
      wait 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

      public void addWebApplication(AntWebAppContext webApp)
      Description copied from interface: ServerProxy
      Adds a new web application to this server.
      Specified by:
      addWebApplication in interface ServerProxy
      Parameters:
      webApp - a AntWebAppContext object.
    • getStopPort

      public int getStopPort()
    • setStopPort

      public void setStopPort(int stopPort)
    • getStopKey

      public String getStopKey()
    • setStopKey

      public void setStopKey(String stopKey)
    • getJettyXml

      public File getJettyXml()
    • setJettyXml

      public void setJettyXml(File jettyXml)
    • getConnectors

      public List<Connector> getConnectors()
    • setConnectors

      public void setConnectors(List<Connector> connectors)
    • getRequestLog

      public RequestLog getRequestLog()
    • setRequestLog

      public void setRequestLog(RequestLog requestLog)
    • getLoginServices

      public List<LoginService> getLoginServices()
    • setLoginServices

      public void setLoginServices(List<LoginService> loginServices)
    • getWebApplications

      public List<AntWebAppContext> getWebApplications()
    • setWebApplications

      public void setWebApplications(List<AntWebAppContext> webApplications)
    • getTempDirectory

      public File getTempDirectory()
    • setTempDirectory

      public void setTempDirectory(File tempDirectory)
    • start

      public void start()
      Description copied from interface: ServerProxy
      Starts this server.
      Specified by:
      start in interface ServerProxy
      See Also:
    • getProxiedObject

      public Object getProxiedObject()
      Specified by:
      getProxiedObject in interface ServerProxy
      See Also:
    • isDaemon

      public boolean isDaemon()
      Returns:
      the daemon
    • setDaemon

      public void setDaemon(boolean daemon)
      Parameters:
      daemon - the daemon to set
    • getContextHandlers

      public ContextHandlers getContextHandlers()
      Returns:
      the contextHandlers
    • setContextHandlers

      public void setContextHandlers(ContextHandlers contextHandlers)
      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

      private void startScanners() throws Exception
      Starts web applications' scanners.
      Throws:
      Exception
    • configureWebApps

      private void configureWebApps()