public RunableRunTask(Job job, IDataClientFactory dataClientFactory, IGraphiteClientFactory graphiteClientFactory, ILog log, Client client)
 {
     this.job = job;
     this.dataClientFactory = dataClientFactory;
     this.graphiteClientFactory = graphiteClientFactory;
     this.log = log;
     this.client = client;
 }
        public IStatsClient Create(Client client)
        {
            var clientType = client.ClientName.ToLower();
            log.Debug(string.Format("Creating a graphite client of type: {0} with values {1} {2}", client.ClientName, client.Hostname, client.Port));
            if (clientType == "GraphiteTcpClient".ToLower())
            {
                return new GraphiteTcpClient(client.Hostname, client.Port);
            }

            if (clientType == "GraphiteUdpClient".ToLower())
            {
                return new GraphiteUdpClient(client.Hostname, client.Port);
            }

            if (clientType == "StatsdClient".ToLower())
            {
                return new StatsdClient(client.Hostname, client.Port);
            }

            throw new UnknownGraphiteClientTypeException(string.Format("{0} {1}", ErrorMessage, clientType));
        }
 private RunableRunTask CreateTask(Client client, Job job)
 {
     return new RunableRunTask(job, this.dataClientFactory, this.graphiteClientFactory, log, client);
 }
 public void AddClient(Client client)
 {
     this.masterConfig.Clients.Add(client);
 }