Class TestService


  • public class TestService
    extends java.lang.Object
    Integration of KIPROTECT KODEX as a service.
    Author:
    Holger Eichelberger, SSE
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private static java.lang.String VERSION  
      static int WAITING_TIME  
    • Constructor Summary

      Constructors 
      Constructor Description
      TestService()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.Process createProcess​(java.io.File dir, java.lang.String... args)
      Creates and starts a Python process.
      static void main​(java.lang.String... args)
      Test execution of Kodex.
      • Methods inherited from class java.lang.Object

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

      • TestService

        public TestService()
    • Method Detail

      • createProcess

        public static java.lang.Process createProcess​(java.io.File dir,
                                                      java.lang.String... args)
                                               throws java.io.IOException
        Creates and starts a Python process.
        Parameters:
        dir - the home dir where to find the script/run it within
        args - the process arguments for the script including python arguments (first), script and script arguments
        Returns:
        the created process
        Throws:
        java.io.IOException - if process creation fails
      • main

        public static void main​(java.lang.String... args)
                         throws java.io.IOException,
                                java.lang.InterruptedException
        Test execution of Kodex.
        Parameters:
        args - command line arguments
        Throws:
        java.io.IOException - in case that the command line streams break
        java.lang.InterruptedException - in case that the Kodex process is interrupted unexpectedly