Interface ProcessServerService

    • Method Detail

      • getStatus

        ProcessServerStatus getStatus()
        Get the value for Status. (The current Service status) This value is mandatory, and therefore will not be null if this object has been retrieved from the database.
        Returns:
        the field
        Throws:
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - This will be thrown if this method is called while the object is not attached to a session.
      • isBrowseable

        boolean isBrowseable()
        Indicates listDirectory can be used
        Returns:
        Is the ProcessServerService browseable?
      • listDirectory

        ListDirectoryResultSet listDirectory​(Long namespace,
                                             String path,
                                             String pattern,
                                             boolean allowFiles,
                                             boolean allowDirectories)
                                      throws com.redwood.scheduler.api.exception.ListDirectoryException,
                                             com.redwood.scheduler.api.exception.ListDirectoryTransientException
        List the contents of a directory.
        Parameters:
        namespace - Which type of path is required. FILESYSTEM, TRACEFILES or INSTALLATION.
        path - The path of the directory that should be listed. Start at the top of a namespace by specifying null or the empty string. The only other accepted paths are paths returned by earlier calls to this operation.
        pattern - Pattern of files and directories to allow. You can assume that some type of wildcarding is allowed, in general this will be ? and *, but this is not guaranteed.
        allowFiles - Shall the list return paths that refer to plain files?
        allowDirectories - Shall the list return paths that refer to subdirectories?
        Returns:
        The contents of the directory.
        Throws:
        com.redwood.scheduler.api.exception.ListDirectoryException - Failure to retrieve the directory content, likely permanent in nature.
        com.redwood.scheduler.api.exception.ListDirectoryTransientException - Failure to retrieve the directory content, likely transient in nature; a retry may succeed.
      • listOSUserSessions

        OSUserSessions listOSUserSessions()
                                   throws com.redwood.scheduler.api.exception.ListOSUserSessionsException
        List the user sessions present on the server that the agent is running on. Will only deliver data for a Microsoft Windows platform agent.
        Returns:
        The user sessions
        Throws:
        com.redwood.scheduler.api.exception.ListOSUserSessionsException - Failure to list user sessions
      • performSocketOperation

        byte[] performSocketOperation​(Long protocol,
                                      String hostname,
                                      Long port,
                                      byte[] data,
                                      Long timeout)
                               throws com.redwood.scheduler.api.exception.PerformSocketOperationException,
                                      com.redwood.scheduler.api.exception.PerformSocketOperationTransientException
        Perform an IP Socket operation remotely on the host that the agent lives on. Only supported by the PlatformAgentService right now.
        Parameters:
        protocol - The IP protocol that should be used to connect. At this moment the supported values are TCP_PROTOCOL and UDP_PROTOCOL.
        hostname - Which host the agent should contact. Name resolution is done by the agent.
        port - The port that the socket should connect to.
        data - Data to send the socket.
        timeout - Timeout in milliseconds for any socket operation. It is intended to be a timeout for the entire operation (which for TCP is open/write/read/close), but this may not be adhered to closely.
        Returns:
        The resulting data returned by the socket, if any.
        Throws:
        com.redwood.scheduler.api.exception.PerformSocketOperationException - An IO or other system exception occurred while performing a socket operation
        com.redwood.scheduler.api.exception.PerformSocketOperationTransientException - An IO or other system exception occurred while performing a socket operation. The error is transient in nature and a retry may work. For example, the process server is down.
      • getRemoteAgentStatusURL

        String getRemoteAgentStatusURL()
        If there is an agent provide the URL for a status page, or null if there is no such page. Only supported by the PlatformAgentService. The link is likely to be valid only for a limited amount of time, after which the agent will refuse to provide the data.
        Returns:
        The resulting URL, or null if there is none.
      • getProcessServer

        ProcessServer getProcessServer()
        Get the ProcessServer.
        Returns:
        ProcessServer
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.
      • getService

        Service getService()
        Get the Service.
        Returns:
        Service
        Throws:
        com.redwood.scheduler.api.exception.ObjectDeletedException - If this method is called when the object has been marked for deletion.
        com.redwood.scheduler.api.exception.ObjectNotAttachedToSessionException - If this method is called when the object has been removed from it's session.