Listener - S41nz/TBTAF GitHub Wiki

TBTAF Listener

Overview

Service that can be listening to the changes submitted to a given source code repos and send the notifications to the Orchestrator to trigger commands that may apply depending on a given criteria (triggers).

API Specification

AddRepoListener

  • Inputs

    1. Reference to a previously created ListenerParameters instance which will contain the following information: ProjectID to which the listener service corresponds to, server side path to the repo, local filepath to the repo, applicable credentials for accessing the repository services and metadata and finally the repository type (E.g. GIT,SVN,etc).
  • Outputs

    1. If everything goes fine during the Listener service creation, then a reference to the corresponding RepoListener instance will be returned.
  • Exceptions

    1. If a None is provided as ListenerParameters reference, then an Invalid Argument Exception will be thrown.
    2. If any of the information contained within the ListenerParameters is invalid, then a special Invalid Listener Parameter exception will be thrown with a concatenated message elaborating which specific part of the parameter information is incorrect.

RemoveRepoListener

  • Inputs

    1. Reference to the RepoListener instance that was previously created and it is required to be removed from the Listener service.
  • Outputs

    1. N/A
  • Exceptions

    1. In case that a None is provided or a non-subscribed RepoListener instance is submitted then an Invalid Argument Exception will be thrown.

Init

  • Inputs

    1. An optional string containing the file path to a Listener control file that will initialize all the parameters for the Listener service once the listener instance has been launched.
  • Outputs

    1. N/A
  • Exceptions

    1. In case that there is a non-existent nor readable location provided as the Listener control file. An Invalid Argument Exception will be thrown.