Class TestServer


  • public class TestServer
    extends java.lang.Object
    • Field Detail

      • DEFAULT_MAX_INACTIVE

        public static int DEFAULT_MAX_INACTIVE
      • DEFAULT_SCAVENGE_SEC

        public static int DEFAULT_SCAVENGE_SEC
      • DEFAULT_EVICTIONPOLICY

        public static int DEFAULT_EVICTIONPOLICY
      • __workers

        protected static int __workers
      • _server

        protected final Server _server
      • _maxInactivePeriod

        protected final int _maxInactivePeriod
      • _scavengePeriod

        protected final int _scavengePeriod
      • _config

        protected java.lang.Object _config
    • Constructor Detail

      • TestServer

        public TestServer​(int port,
                          int maxInactivePeriod,
                          int scavengePeriod,
                          SessionCacheFactory cacheFactory,
                          SessionDataStoreFactory storeFactory)
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
    • Method Detail

      • extractSessionId

        public static java.lang.String extractSessionId​(java.lang.String sessionCookie)
      • newSessionHandler

        public SessionHandler newSessionHandler()
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • start

        public void start()
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getPort

        public int getPort()
      • addContext

        public ServletContextHandler addContext​(java.lang.String contextPath)
                                         throws java.lang.Exception
        Throws:
        java.lang.Exception
      • stop

        public void stop()
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • addWebAppContext

        public WebAppContext addWebAppContext​(java.lang.String warPath,
                                              java.lang.String contextPath)
                                       throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getServer

        public Server getServer()