Indy 9
|
TIdCommand = class(TObject)
TIdCommand provides properties that identify the Thread generating the command, and the CommandHandler used to service the command. In addition, TIdCommand also implements methods that allow assigning the response for the command, and a mechanism for sending the command reply using the Thread connection that generated the command request.
TIdCommand instances are created in TIdCommandHandler.Check when a given command can be handled by the CommandHandlers for the server, using the peer thread that is executed in the Server context.
property CommandHandler: TIdCommandHandler;
property Params: TStrings;
UnparsedParams can be used to access the parameter values before parsing was performed.
property PerformReply: Boolean;
property RawLine: string;
property Reply: TIdRFCReply;
Reply can be altered if an exception is raised during execution of the command. After an exception is raised, Reply will contain the ReplyExceptionCode, from either the server or the command handler that raised the exception, and the exception text.
Reply is sent to the peer connection prior to the Response for the command handler when PerformReply is True.
property Response: TStrings;
property Thread: TIdPeerThread;
Thread is assigned when the TIdCommand instance is created by the command handler for the executing thread.
property UnparsedParams: string;
UnparsedParams is used to determine the values added to the Params property when the command handler creates the object instance.
constructor Create; virtual;
destructor Destroy; override;
procedure SendReply;
procedure SetResponse(AValue: TStrings);