Interface RemoteAgentConnection

    • Method Detail

      • isLocal

        void isLocal​(Action<Boolean> callback)
        Check whether this connection is local (Agent works on the same machine)
      • stopBuild

        boolean stopBuild​(long buildId)
        Send stop build command to agent.
        Returns:
        true if agent confirms build stopping.
        Throws:
        AgentTimeoutException - if the agent didn't get this command because of timeout.
        TeamCityRuntimeException - in case of any other errors.
      • upgrade

        boolean upgrade​(Action<Boolean> callback)
        Sends upgrade command on agent
        Parameters:
        callback - will be called with true if upgrade was accepted by agent.
      • getCustomHandler

        <T> T getCustomHandler​(Class<T> tClass)
        Extension point allowing to send custom commands to agent.
      • getProtocolDescription

        @NotNull
        String getProtocolDescription()
      • getType

        @NotNull
        String getType()
        It's different from getProtocolDescription() in a way that the returned value will not change in the future and can be used to determine type of the connection.
      • dispose

        void dispose()
        Close this connection.
      • updateAgentInfo

        void updateAgentInfo​(int agentId,
                             @NotNull
                             String agentName)
        Updates information about the agent in the connection
        Parameters:
        agentId -
        agentName -
      • isMultiNodeAware

        default boolean isMultiNodeAware()
        Returns:
        true if this connection can be used on any node and false if it can be used only on the node which manages agents