public ValueTranslatorHttpSender(IHttpSender httpSender, string translationClientName) { InternalContract.RequireNotNull(httpSender, nameof(httpSender)); InternalContract.RequireNotNullOrWhiteSpace(translationClientName, nameof(translationClientName)); HttpSender = httpSender; TranslationClientName = translationClientName; }
public JobDetailSender(NodeConfiguration nodeConfiguration, IHttpSender httpSender) { _httpSender = httpSender; _jobDetails = new List <JobDetailEntity>(); _uriBuilder = new UriBuilder(nodeConfiguration.ManagerLocation); _uriBuilder.Path += ManagerRouteConstants.JobProgress; }
public TrySendJobDetailToManagerTimerFake(NodeConfiguration nodeConfiguration, IHttpSender httpSender, double interval) : base(nodeConfiguration, httpSender, interval) { WaitHandle = new ManualResetEventSlim(); }
public NodeStartupNotificationToManagerFake(NodeConfiguration nodeConfiguration, IHttpSender httpSender, double interval = 1000, bool autoReset = false) : base(nodeConfiguration, httpSender, interval, autoReset) { }
public SendJobDoneTimerFake(NodeConfiguration nodeConfiguration, TrySendJobDetailToManagerTimer sendJobDetailToManagerTimer, IHttpSender httpSender, double interval = 1000) : base(nodeConfiguration, sendJobDetailToManagerTimer, httpSender, interval) { }
public HttpClient(HttpClientBuilder builder) { _host = builder.Host; _keepAlive = builder.KeepAlive; _sender = builder.Sender ?? new HttpSenderAsync(_host, builder.Decoders); Timeout = builder.Timeout; _requestPreprocessor = builder.RequestMiddleware; _responsePreprocessor = builder.ResponseMiddleware; }
public SendJobDoneTimerFake(NodeConfiguration nodeConfiguration, JobDetailSender jobDetailSender, IHttpSender httpSender, double interval = 1000) : base(nodeConfiguration, jobDetailSender, httpSender, interval) { }
public SendJobDoneWithEventTriggerTimerFake(NodeConfiguration nodeConfiguration, Uri callbackTemplateUri, JobDetailSender jobDetailSender, IHttpSender httpSender) : base(nodeConfiguration, callbackTemplateUri, jobDetailSender, httpSender) { }
public SendJobDoneWithEventTriggerTimerFake(NodeConfiguration nodeConfiguration, Uri callbackTemplateUri, TrySendJobDetailToManagerTimer sendJobDetailToManagerTimer, IHttpSender httpSender) : base(nodeConfiguration, callbackTemplateUri, sendJobDetailToManagerTimer, httpSender) { }
public TrySendJobCanceledToManagerTimer(NodeConfiguration nodeConfiguration, JobDetailSender jobDetailSender, IHttpSender httpSender, double interval = 500) : base(nodeConfiguration, nodeConfiguration.GetManagerJobHasBeenCanceledTemplateUri(), jobDetailSender, httpSender, interval) { }
public TrySendJobDoneStatusToManagerTimer(NodeConfiguration nodeConfiguration, JobDetailSender jobDetailSender, IHttpSender httpSender, double interval = 500) : base(nodeConfiguration, nodeConfiguration.GetManagerJobDoneTemplateUri(), jobDetailSender, httpSender, interval) { }
public TrySendJobDoneStatusToManagerTimer(NodeConfiguration nodeConfiguration, TrySendJobDetailToManagerTimer sendJobDetailToManagerTimer, IHttpSender httpSender, double interval = 500) : base(nodeConfiguration, nodeConfiguration.GetManagerJobDoneTemplateUri(), sendJobDetailToManagerTimer, httpSender, interval) { }
public TrySendJobCanceledToManagerTimer(NodeConfiguration nodeConfiguration, TrySendJobDetailToManagerTimer sendJobDetailToManagerTimer, IHttpSender httpSender, double interval = 500) : base(nodeConfiguration, nodeConfiguration.GetManagerJobHasBeenCanceledTemplateUri(), sendJobDetailToManagerTimer, httpSender, interval) { }
public PingToManagerTimer(NodeConfiguration nodeConfiguration, IHttpSender httpSender) : base(nodeConfiguration.PingToManagerSeconds*1000) { _cancellationTokenSource = new CancellationTokenSource(); _nodeConfiguration = nodeConfiguration; _httpSender = httpSender; _whoAmI = nodeConfiguration.CreateWhoIAm(Environment.MachineName); Elapsed += OnTimedEvent; }
public PingToManagerTimer(NodeConfiguration nodeConfiguration, IHttpSender httpSender) : base(nodeConfiguration.PingToManagerSeconds * 1000) { _cancellationTokenSource = new CancellationTokenSource(); _exceptionLoggerHandler = new TimerExceptionLoggerStrategyHandler(TimerExceptionLoggerStrategyHandler.DefaultLogInterval, GetType()); _nodeConfiguration = nodeConfiguration; _httpSender = httpSender; _whoAmI = nodeConfiguration.CreateWhoIAm(Environment.MachineName); Elapsed += OnTimedEvent; }
public TrySendJobFaultedToManagerTimer(NodeConfiguration nodeConfiguration, TrySendJobDetailToManagerTimer sendJobDetailToManagerTimer, IHttpSender httpSender, double interval = 500) : base(nodeConfiguration, nodeConfiguration .GetManagerJobHasFailedTemplatedUri(), sendJobDetailToManagerTimer, httpSender, interval) { _httpSender = httpSender; }
public TrySendJobDetailToManagerTimer(NodeConfiguration nodeConfiguration, IHttpSender httpSender, double interval = 500) : base(interval) { _httpSender = httpSender; _cancellationTokenSource = new CancellationTokenSource(); _jobDetails = new ConcurrentDictionary<Guid, JobDetailEntity>(); _uriBuilder = new UriBuilder(nodeConfiguration.ManagerLocation); _uriBuilder.Path += ManagerRouteConstants.JobProgress; Elapsed += OnTimedEvent; }
public TrySendJobFaultedToManagerTimer(NodeConfiguration nodeConfiguration, JobDetailSender jobDetailSender, IHttpSender httpSender, double interval = 500) : base(nodeConfiguration, nodeConfiguration .GetManagerJobHasFailedTemplatedUri(), jobDetailSender, httpSender, interval) { _httpSender = httpSender; }
public TrySendStatusToManagerTimer(NodeConfiguration nodeConfiguration, Uri callbackTemplateUri, TrySendJobDetailToManagerTimer sendJobDetailToManagerTimer, IHttpSender httpSender, double interval = 500) : base(interval) { _cancellationTokenSource = new CancellationTokenSource(); _whoAmI = nodeConfiguration.CreateWhoIAm(Environment.MachineName); _sendJobDetailToManagerTimer = sendJobDetailToManagerTimer; _httpSender = httpSender; CallbackTemplateUri = callbackTemplateUri; Elapsed += OnTimedEvent; AutoReset = true; }
public TrySendNodeStartUpNotificationToManagerTimer(NodeConfiguration nodeConfiguration, IHttpSender httpSender, double interval = 5000, bool autoReset = true) : base(interval) { var callbackToManagerTemplateUri = nodeConfiguration.GetManagerNodeHasBeenInitializedUri(); _cancellationTokenSource = new CancellationTokenSource(); _nodeConfiguration = nodeConfiguration; _callbackToManagerTemplateUri = callbackToManagerTemplateUri; _httpSender = httpSender; _whoAmI = _nodeConfiguration.CreateWhoIAm(Environment.MachineName); Elapsed += OnTimedEvent; AutoReset = autoReset; }
public TrySendStatusToManagerTimer(NodeConfiguration nodeConfiguration, Uri callbackTemplateUri, JobDetailSender jobDetailSender, IHttpSender httpSender, double interval = 500) : base(interval) { _cancellationTokenSource = new CancellationTokenSource(); _whoAmI = nodeConfiguration.CreateWhoIAm(Environment.MachineName); _enableGc = nodeConfiguration.EnableGarbageCollection; _jobDetailSender = jobDetailSender; _httpSender = httpSender; CallbackTemplateUri = callbackTemplateUri; _exceptionLoggerHandler = new TimerExceptionLoggerStrategyHandler(TimerExceptionLoggerStrategyHandler.DefaultLogInterval, GetType()); Elapsed += OnTimedEvent; AutoReset = true; }
public TrySendNodeStartUpNotificationToManagerTimer(NodeConfiguration nodeConfiguration, IHttpSender httpSender, double interval = 5000, bool autoReset = true) : base(interval) { var callbackToManagerTemplateUri = nodeConfiguration.GetManagerNodeHasBeenInitializedUri(); _cancellationTokenSource = new CancellationTokenSource(); _nodeConfiguration = nodeConfiguration; _callbackToManagerTemplateUri = callbackToManagerTemplateUri; _httpSender = httpSender; _whoAmI = _nodeConfiguration.CreateWhoIAm(Environment.MachineName); _exceptionLoggerHandler = new TimerExceptionLoggerStrategyHandler(TimerExceptionLoggerStrategyHandler.DefaultLogInterval, GetType()); Elapsed += OnTimedEvent; AutoReset = autoReset; }
public JobRepository(ManagerConfiguration managerConfiguration, RetryPolicyProvider retryPolicyProvider, CreateSqlCommandHelper createSqlCommandHelper, IHttpSender httpSender) { if (retryPolicyProvider == null) { throw new ArgumentNullException("retryPolicyProvider"); } if (retryPolicyProvider.GetPolicy() == null) { throw new ArgumentNullException("retryPolicyProvider.GetPolicy"); } _connectionString = managerConfiguration.ConnectionString; _createSqlCommandHelper = createSqlCommandHelper; _httpSender = httpSender; _retryPolicy = retryPolicyProvider.GetPolicy(); }
//private static readonly ILog ManagerLogger = LogManager.GetLogger("Stardust.ManagerLog"); public JobRepository(ManagerConfiguration managerConfiguration, RetryPolicyProvider retryPolicyProvider, IHttpSender httpSender, JobRepositoryCommandExecuter jobRepositoryCommandExecuter, ILog managerLogger) { if (retryPolicyProvider == null) { throw new ArgumentNullException("retryPolicyProvider"); } if (retryPolicyProvider.GetPolicy() == null) { throw new ArgumentNullException("retryPolicyProvider.GetPolicy"); } _connectionString = managerConfiguration.ConnectionString; _httpSender = httpSender; _jobRepositoryCommandExecuter = jobRepositoryCommandExecuter; ManagerLogger = managerLogger; _retryPolicy = retryPolicyProvider.GetPolicy(); }
public Capability1RestClient(IHttpSender httpSender) : base(httpSender) { }
public BusinessApiRestClient(IHttpSender httpSender) : base(httpSender) { }
/// <summary></summary> /// <param name="parentName">The name of the sub path that is the parent of the children. (Singular noun)</param> /// <param name="childrenName">The name of the sub path that are the children. (Plural noun)</param> /// <param name="httpSender">How to actually send HTTP requests.</param> public CrudSlaveToMasterRestClient(string parentName, string childrenName, IHttpSender httpSender) : base(parentName, childrenName, httpSender) { }
public WeiXinService(IHttpSender httpSender, IOptions <WechatAccountOptions> options) { _httpSender = httpSender; _options = options; }
public HttpClientBuilder WithCustomSender(IHttpSender sender) { Sender = sender; return(this); }
/// <summary></summary> /// <param name="parentName">The name of the sub path that is the parent of the children. (Singular noun)</param> /// <param name="childrenName">The name of the sub path that are the children. (Plural noun)</param> /// <param name="httpSender">How to actually send HTTP requests.</param> public CrudDependentToMasterWithUniqueIdRestClient(string parentName, string childrenName, IHttpSender httpSender) : base(parentName, childrenName, httpSender) { }
/// <inheritdoc /> public RestClient(IHttpSender httpSender) { InternalContract.RequireNotNull(httpSender, nameof(httpSender)); HttpSender = httpSender; }
public IntegrationApiRestClient(IHttpSender httpSender) : base(httpSender) { }
/// <summary></summary> /// <param name="parentName">The name of the sub path that is the parent of the children. (Singular noun)</param> /// <param name="childrenName">The name of the sub path that are the children. (Plural noun)</param> /// <param name="httpSender">How to actually send HTTP requests.</param> public CrudManyToOneRestClient(IHttpSender httpSender, string parentName = "Parent", string childrenName = "Children") : base(httpSender, parentName, childrenName) { }
/// <summary> /// Constructor. /// </summary> /// <param name="httpSender"></param> public CrudRestClient(IHttpSender httpSender) : base(httpSender) { }
public HttpClient(string host, bool keepAlive = true) { _host = host; _keepAlive = keepAlive; _sender = new HttpSenderAsync(host, new IContentEncoder[0]); }