Class ExecutableManager

    • Field Detail

      • temporaryLibRoot

        protected final java.lang.String temporaryLibRoot
      • libRoot

        protected final java.lang.String libRoot
      • requestCounter

        protected final java.util.concurrent.atomic.AtomicLong requestCounter
    • Constructor Detail

      • ExecutableManager

        public ExecutableManager​(java.lang.String temporaryLibRoot,
                                 java.lang.String libRoot)
    • Method Detail

      • request

        public ExecutableResource request​(java.util.List<java.lang.String> uris)
                                   throws java.net.URISyntaxException,
                                          java.io.IOException
        Throws:
        java.net.URISyntaxException
        java.io.IOException
      • moveFileUnderTempRootToExtLibDir

        public void moveFileUnderTempRootToExtLibDir​(ExecutableResource resource,
                                                     java.lang.String name)
                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • copyFileToExtLibDir

        public void copyFileToExtLibDir​(java.lang.String filePath)
                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • removeFileUnderLibRoot

        public void removeFileUnderLibRoot​(java.lang.String fileName)
                                    throws java.io.IOException
        Throws:
        java.io.IOException
      • hasFileUnderLibRoot

        public boolean hasFileUnderLibRoot​(java.lang.String fileName)
      • hasFileUnderInstallDir

        public boolean hasFileUnderInstallDir​(java.lang.String fileName)
      • hasFileUnderTemporaryRoot

        public boolean hasFileUnderTemporaryRoot​(java.lang.String fileName)
      • saveTextAsFileUnderTemporaryRoot

        public void saveTextAsFileUnderTemporaryRoot​(java.lang.String text,
                                                     java.lang.String fileName)
                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • removeFileUnderTemporaryRoot

        public void removeFileUnderTemporaryRoot​(java.lang.String fileName)
                                          throws java.io.IOException
        Throws:
        java.io.IOException
      • readTextFromFileUnderTemporaryRoot

        public java.lang.String readTextFromFileUnderTemporaryRoot​(java.lang.String fileName)
                                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • getDirUnderTempRootByRequestId

        public java.io.File getDirUnderTempRootByRequestId​(long requestId)
      • getDirStringUnderTempRootByRequestId

        public java.lang.String getDirStringUnderTempRootByRequestId​(long requestId)
      • getDirUnderLibRootByName

        public java.io.File getDirUnderLibRootByName​(java.lang.String name)
      • getDirStringUnderLibRootByName

        public java.lang.String getDirStringUnderLibRootByName​(java.lang.String name)
      • getFileUnderLibRootByName

        public java.io.File getFileUnderLibRootByName​(java.lang.String name)
      • getFileStringUnderLibRootByName

        public java.lang.String getFileStringUnderLibRootByName​(java.lang.String name)
      • getFileStringUnderInstallByName

        public java.lang.String getFileStringUnderInstallByName​(java.lang.String name)
      • transferToBytebuffer

        public static java.nio.ByteBuffer transferToBytebuffer​(java.lang.String filePath)
                                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • saveToDir

        protected void saveToDir​(java.nio.ByteBuffer byteBuffer,
                                 java.lang.String destination)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • saveToLibDir

        public void saveToLibDir​(java.nio.ByteBuffer byteBuffer,
                                 java.lang.String fileName)
                          throws java.io.IOException
        Parameters:
        byteBuffer - file
        fileName - The name of the file. Absolute Path will be libRoot + File_Separator + fileName
        Throws:
        java.io.IOException
      • saveToInstallDir

        public void saveToInstallDir​(java.nio.ByteBuffer byteBuffer,
                                     java.lang.String fileName)
                              throws java.io.IOException
        Parameters:
        byteBuffer - file
        fileName - Absolute Path will be libRoot + File_Separator + INSTALL_DIR + File.separator + fileName
        Throws:
        java.io.IOException
      • getTemporaryLibRoot

        public java.lang.String getTemporaryLibRoot()
      • getLibRoot

        public java.lang.String getLibRoot()
      • getInstallDir

        public java.lang.String getInstallDir()