Lean  $LEAN_TAG$
QuantConnect.Commands.BaseCommandHandler Class Referenceabstract

Base algorithm command handler More...

Inheritance diagram for QuantConnect.Commands.BaseCommandHandler:
[legend]

Public Member Functions

virtual void Initialize (AlgorithmNodePacket job, IAlgorithm algorithm)
 Initializes this command queue for the specified job More...
 
IEnumerable< CommandResultPacketProcessCommands ()
 Will consumer and execute any command in the queue More...
 
virtual void Dispose ()
 Disposes of this instance More...
 

Protected Member Functions

abstract IEnumerable< ICommandGetCommands ()
 Get the commands to run More...
 
virtual void Acknowledge (ICommand command, CommandResultPacket commandResultPacket)
 Acknowledge a command that has been executed More...
 
ICommand TryGetCallbackCommand (string payload)
 Helper method to create a callback command More...
 

Static Protected Attributes

static readonly JsonSerializerSettings Settings = new() { TypeNameHandling = TypeNameHandling.All }
 Command json settings More...
 

Properties

IAlgorithm Algorithm [get, set]
 The algorithm instance More...
 

Detailed Description

Base algorithm command handler

Definition at line 30 of file BaseCommandHandler.cs.

Member Function Documentation

◆ Initialize()

virtual void QuantConnect.Commands.BaseCommandHandler.Initialize ( AlgorithmNodePacket  job,
IAlgorithm  algorithm 
)
virtual

Initializes this command queue for the specified job

Parameters
jobThe job that defines what queue to bind to
algorithmThe algorithm instance

Implements QuantConnect.Commands.ICommandHandler.

Definition at line 47 of file BaseCommandHandler.cs.

◆ GetCommands()

abstract IEnumerable<ICommand> QuantConnect.Commands.BaseCommandHandler.GetCommands ( )
protectedpure virtual

Get the commands to run

Implemented in QuantConnect.Commands.FileCommandHandler.

Here is the caller graph for this function:

◆ Acknowledge()

virtual void QuantConnect.Commands.BaseCommandHandler.Acknowledge ( ICommand  command,
CommandResultPacket  commandResultPacket 
)
protectedvirtual

Acknowledge a command that has been executed

Parameters
commandThe command that was executed
commandResultPacketThe result

Reimplemented in QuantConnect.Commands.FileCommandHandler.

Definition at line 62 of file BaseCommandHandler.cs.

Here is the caller graph for this function:

◆ ProcessCommands()

IEnumerable<CommandResultPacket> QuantConnect.Commands.BaseCommandHandler.ProcessCommands ( )

Will consumer and execute any command in the queue

Implements QuantConnect.Commands.ICommandHandler.

Definition at line 70 of file BaseCommandHandler.cs.

Here is the call graph for this function:

◆ Dispose()

virtual void QuantConnect.Commands.BaseCommandHandler.Dispose ( )
virtual

Disposes of this instance

Definition at line 110 of file BaseCommandHandler.cs.

◆ TryGetCallbackCommand()

ICommand QuantConnect.Commands.BaseCommandHandler.TryGetCallbackCommand ( string  payload)
protected

Helper method to create a callback command

Definition at line 118 of file BaseCommandHandler.cs.

Here is the call graph for this function:

Member Data Documentation

◆ Settings

readonly JsonSerializerSettings QuantConnect.Commands.BaseCommandHandler.Settings = new() { TypeNameHandling = TypeNameHandling.All }
staticprotected

Command json settings

Definition at line 35 of file BaseCommandHandler.cs.

Property Documentation

◆ Algorithm

IAlgorithm QuantConnect.Commands.BaseCommandHandler.Algorithm
getsetprotected

The algorithm instance

Definition at line 40 of file BaseCommandHandler.cs.


The documentation for this class was generated from the following file: