Class AgentFileManagerImpl

    • Method Detail

      • requestForFile

        public void requestForFile​(@NotNull
                                   String agentName,
                                   @NotNull
                                   String fileName,
                                   boolean lookupInCache,
                                   @NotNull
                                   SAgentFileManager.Callback callback)
        Description copied from interface: SAgentFileManager
        Performs asynchronous request to the agent agentName for a fileName file (or directory). The caller is notified about the result via callback. In case of success the caller is provided with the local copy of the requested file.

        The fileName supports several useful macros: "#home", "#work", "#temp", "#logs", "#plugins", "#lib", "#update", "#conf", and "#cache", each referring to a specific agent directory. These macros are to be used to specify the root of the requested file (or directory).

        Examples:

        • "#logs" - full logs directory
        • "#work/directory.map" - a "directory.map" file inside agent working directory
        • "#plugins/ant/lib" - full "lib" directory of the Ant plugin

        Current limitations:

        • you can use only slash separator ('/' instead of '\')
        • wildcards "?" and "*" are not supported

        By default all transferred data is encrypted.

        Specified by:
        requestForFile in interface SAgentFileManager
        Parameters:
        agentName - the name of agent to request to
        fileName - file (or directory) name in the format above
        lookupInCache - if set to true, server will try to use cached data
        callback - the callback
      • success

        public void success​(@NotNull
                            String sessionId,
                            @NotNull
                            org.springframework.web.multipart.MultipartFile data,
                            boolean archived)
        Specified by:
        success in interface AgentFileManagerCallback