26.181. Interface IAgentHandler

Namespace: ArmoniK.Core.Common.Pollster
Assembly: ArmoniK.Core.Common.dll

Interface to create classes that will populate when worker sends requests

public interface IAgentHandler

26.181.1. Methods

26.181.1.1. Start(string, ILogger, SessionData, TaskData, string, CancellationToken)

Starts the handler

Task<IAgent> Start(string token, ILogger logger, SessionData sessionData, TaskData taskData, string folder, CancellationToken cancellationToken)

26.181.1.1.1. Parameters

token string

Token that can be used to differentiate running tasks

logger ILogger

Logger that may be injected into the handler that embed preconfigured scopes

sessionData SessionData

Session metadata

taskData TaskData

Task metadata

folder string

Shared folder between Agent and Worker

cancellationToken CancellationToken

Token used to cancel the execution of the method

26.181.1.1.2. Returns

Task<IAgent>

Task representing the asynchronous execution of the method

26.181.1.2. Stop(CancellationToken)

Stops the handler

Task Stop(CancellationToken cancellationToken)

26.181.1.2.1. Parameters

cancellationToken CancellationToken

Token used to cancel the execution of the method

26.181.1.2.2. Returns

Task

Task representing the asynchronous execution of the method