namespace ZB.MOM.WW.MxGateway.Server.Sessions;

/// <summary>
/// Creates worker client instances for gateway sessions.
/// </summary>
public interface ISessionWorkerClientFactory
{
    /// <summary>
    /// Creates a worker client for the specified session.
    /// </summary>
    /// <param name="session">Session to create a worker client for.</param>
    /// <param name="cancellationToken">Token to cancel the asynchronous operation.</param>
    /// <returns>A worker client connected to the worker process.</returns>
    Task<ZB.MOM.WW.MxGateway.Server.Workers.IWorkerClient> CreateAsync(
        GatewaySession session,
        CancellationToken cancellationToken);
}
