Class TestServer

  • All Implemented Interfaces:
    de.iip_ecosphere.platform.support.Server

    public class TestServer
    extends java.lang.Object
    implements de.iip_ecosphere.platform.support.Server
    A simple server for testing.
    Author:
    Holger Eichelberger, SSE
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      private static class  TestServer.TestRunnable  
    • Constructor Summary

      Constructors 
      Constructor Description
      TestServer()
      Creates the server instance.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static int getAndResetCreatedCount()
      Returns the counter for the number of created instances and resets the counter.
      static int getAndResetStoppedCount()
      Returns the counter for the number of stopped instances and resets the counter.
      de.iip_ecosphere.platform.support.Server start()  
      void stop​(boolean dispose)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • created

        private static int created
      • stopped

        private static int stopped
    • Constructor Detail

      • TestServer

        public TestServer()
        Creates the server instance.
    • Method Detail

      • start

        public de.iip_ecosphere.platform.support.Server start()
        Specified by:
        start in interface de.iip_ecosphere.platform.support.Server
      • stop

        public void stop​(boolean dispose)
        Specified by:
        stop in interface de.iip_ecosphere.platform.support.Server
      • getAndResetCreatedCount

        public static int getAndResetCreatedCount()
        Returns the counter for the number of created instances and resets the counter.
        Returns:
        the number of created instances since the last call
      • getAndResetStoppedCount

        public static int getAndResetStoppedCount()
        Returns the counter for the number of stopped instances and resets the counter.
        Returns:
        the number of stopped instances since the last call