Class JettyEmbedder

  • All Implemented Interfaces:
    LifeCycle

    public class JettyEmbedder
    extends AbstractLifeCycle
    JettyEmbedded Starts jetty within the current process.
    • Field Detail

      • contextHandlers

        protected java.util.List<ContextHandler> contextHandlers
      • loginServices

        protected java.util.List<LoginService> loginServices
      • server

        protected Server server
      • exitVm

        protected boolean exitVm
      • stopAtShutdown

        protected boolean stopAtShutdown
      • jettyXmlFiles

        protected java.util.List<java.io.File> jettyXmlFiles
      • jettyProperties

        protected java.util.Map<java.lang.String,​java.lang.String> jettyProperties
      • stopPort

        protected int stopPort
      • stopKey

        protected java.lang.String stopKey
    • Constructor Detail

      • JettyEmbedder

        public JettyEmbedder()
    • Method Detail

      • getContextHandlers

        public java.util.List<ContextHandler> getContextHandlers()
      • setContextHandlers

        public void setContextHandlers​(java.util.List<ContextHandler> contextHandlers)
      • getLoginServices

        public java.util.List<LoginService> getLoginServices()
      • setLoginServices

        public void setLoginServices​(java.util.List<LoginService> loginServices)
      • getRequestLog

        public RequestLog getRequestLog()
      • setRequestLog

        public void setRequestLog​(RequestLog requestLog)
      • getServer

        public Server getServer()
      • setServer

        public void setServer​(Server server)
      • isExitVm

        public boolean isExitVm()
      • setExitVm

        public void setExitVm​(boolean exitVm)
      • isStopAtShutdown

        public boolean isStopAtShutdown()
      • setStopAtShutdown

        public void setStopAtShutdown​(boolean stopAtShutdown)
      • getJettyXmlFiles

        public java.util.List<java.io.File> getJettyXmlFiles()
      • setJettyXmlFiles

        public void setJettyXmlFiles​(java.util.List<java.io.File> jettyXmlFiles)
      • getJettyProperties

        public java.util.Map<java.lang.String,​java.lang.String> getJettyProperties()
      • setJettyProperties

        public void setJettyProperties​(java.util.Map<java.lang.String,​java.lang.String> jettyProperties)
      • setShutdownMonitor

        public void setShutdownMonitor​(ShutdownMonitor shutdownMonitor)
      • getStopPort

        public int getStopPort()
      • setStopPort

        public void setStopPort​(int stopPort)
      • getStopKey

        public java.lang.String getStopKey()
      • setStopKey

        public void setStopKey​(java.lang.String stopKey)
      • setWebApp

        public void setWebApp​(MavenWebAppContext app)
                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • setWebAppProperties

        public void setWebAppProperties​(java.util.Properties props)
      • getContextXml

        public java.lang.String getContextXml()
      • setContextXml

        public void setContextXml​(java.lang.String contextXml)
      • doStart

        public void doStart()
                     throws java.lang.Exception
        Description copied from class: AbstractLifeCycle
        Method to override to start the lifecycle
        Overrides:
        doStart in class AbstractLifeCycle
        Throws:
        AbstractLifeCycle.StopException - If thrown, the lifecycle will immediately be stopped.
        java.lang.Exception - If there was a problem starting. Will cause a transition to FAILED state
      • redeployWebApp

        protected void redeployWebApp()
                               throws java.lang.Exception
        Throws:
        java.lang.Exception
      • join

        protected void join()
                     throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException