Class TRALClient

Unit

Declaration

type TRALClient = class(TRALComponent)

Description

TRALClient

Hierarchy

Overview

Methods

Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public function Clone(AOwner: TComponent = nil): TRALClient; virtual;
Protected function CreateClient: TRALClientHTTP;
Protected function ExecuteSingle(ARoute: StringRAL; AMethod: TRALMethod) : TRALResponse; virtual;
Public procedure Delete(ARoute: StringRAL; var AResponse : TRALResponse); overload;
Public procedure Delete(ARoute: StringRAL; AOnResponse: TRALThreadClientResponse = nil; AExecBehavior : TRALExecBehavior = ebMultiThread); overload;
Public procedure Get(ARoute: StringRAL; AOnResponse: TRALThreadClientResponse = nil; AExecBehavior : TRALExecBehavior = ebMultiThread); overload;
Public procedure Get(ARoute: StringRAL; var AResponse : TRALResponse); overload;
Public procedure Patch(ARoute: StringRAL; AOnResponse: TRALThreadClientResponse = nil; AExecBehavior : TRALExecBehavior = ebMultiThread); overload;
Public procedure Patch(ARoute: StringRAL; var AResponse : TRALResponse); overload;
Public procedure Post(ARoute: StringRAL; AOnResponse: TRALThreadClientResponse = nil; AExecBehavior : TRALExecBehavior = ebMultiThread); overload;
Public procedure Post(ARoute: StringRAL; var AResponse : TRALResponse); overload;
Public procedure Put(ARoute: StringRAL; AOnResponse: TRALThreadClientResponse = nil; AExecBehavior: TRALExecBehavior = ebMultiThread); overload;
Public procedure Put(ARoute: StringRAL; var AResponse : TRALResponse); overload;
Protected procedure CopyProperties(ADest: TRALClient); virtual;
Protected procedure ExecuteThread(ARoute: StringRAL; AMethod: TRALMethod; AOnResponse: TRALThreadClientResponse = nil; AExecBehavior : TRALExecBehavior = ebMultiThread); virtual;
Protected procedure LockSession;
Protected procedure Notification(AComponent: TComponent; Operation: TOperation); override;
Protected procedure OnThreadResponse(Sender: TObject; AResponse: TRALResponse; AException: StringRAL);
Protected procedure SetAuthentication(AValue: TRALAuthClient);
Protected procedure SetBaseURL(AValue: TStrings);
Protected procedure SetConnectTimeout(const AValue: IntegerRAL); virtual;
Protected procedure SetEngineType(AValue: String);
Protected procedure SetKeepAlive(AValue: boolean); virtual;
Protected procedure SetRequestTimeout(AValue: IntegerRAL); virtual;
Protected procedure SetUserAgent(AValue: StringRAL); virtual;
Protected procedure UnLockSession;

Properties

Published property Authentication: TRALAuthClient read FAuthentication write SetAuthentication;
Published property BaseURL: TStrings read FBaseURL write SetBaseURL;
Published property CompressType: TRALCompressType read FCompressType write FCompressType;
Published property ConnectTimeout: IntegerRAL read FConnectTimeout write FConnectTimeout default 5000;
Published property CriptoOptions: TRALCriptoOptions read FCriptoOptions write FCriptoOptions;
Published property Engine: StringRAL read FEngine;
Published property EngineType : String read FEngineType write SetEngineType;
Protected property IndexUrl: IntegerRAL read FIndexUrl write FIndexUrl;
Published property KeepAlive: boolean read FKeepAlive write SetKeepAlive;
Published property OnResponse: TRALThreadClientResponse read FOnResponse write FOnResponse;
Public property Request: TRALRequest read FRequest;
Published property RequestTimeout: IntegerRAL read FRequestTimeout write SetRequestTimeout default 30000;
Published property UserAgent: StringRAL read FUserAgent write SetUserAgent;

Description

Methods

Public constructor Create(AOwner: TComponent); override;
 
Public destructor Destroy; override;
 
Public function Clone(AOwner: TComponent = nil): TRALClient; virtual;
 
Protected function CreateClient: TRALClientHTTP;
 
Protected function ExecuteSingle(ARoute: StringRAL; AMethod: TRALMethod) : TRALResponse; virtual;
 
Public procedure Delete(ARoute: StringRAL; var AResponse : TRALResponse); overload;

Defines method on the client: Delete.

Public procedure Delete(ARoute: StringRAL; AOnResponse: TRALThreadClientResponse = nil; AExecBehavior : TRALExecBehavior = ebMultiThread); overload;
 
Public procedure Get(ARoute: StringRAL; AOnResponse: TRALThreadClientResponse = nil; AExecBehavior : TRALExecBehavior = ebMultiThread); overload;
 
Public procedure Get(ARoute: StringRAL; var AResponse : TRALResponse); overload;

Defines method on the client: Get.

Public procedure Patch(ARoute: StringRAL; AOnResponse: TRALThreadClientResponse = nil; AExecBehavior : TRALExecBehavior = ebMultiThread); overload;
 
Public procedure Patch(ARoute: StringRAL; var AResponse : TRALResponse); overload;

Defines method on the client: Patch.

Public procedure Post(ARoute: StringRAL; AOnResponse: TRALThreadClientResponse = nil; AExecBehavior : TRALExecBehavior = ebMultiThread); overload;
 
Public procedure Post(ARoute: StringRAL; var AResponse : TRALResponse); overload;

Defines method on the client: Post.

Public procedure Put(ARoute: StringRAL; AOnResponse: TRALThreadClientResponse = nil; AExecBehavior: TRALExecBehavior = ebMultiThread); overload;
 
Public procedure Put(ARoute: StringRAL; var AResponse : TRALResponse); overload;

Defines method on the client: Put.

Protected procedure CopyProperties(ADest: TRALClient); virtual;

Copy all properties of current TRALClientBase object

Protected procedure ExecuteThread(ARoute: StringRAL; AMethod: TRALMethod; AOnResponse: TRALThreadClientResponse = nil; AExecBehavior : TRALExecBehavior = ebMultiThread); virtual;

core method of the client. Must override on children.

Protected procedure LockSession;
 
Protected procedure Notification(AComponent: TComponent; Operation: TOperation); override;

needed to properly remove assignment in design-time.

Protected procedure OnThreadResponse(Sender: TObject; AResponse: TRALResponse; AException: StringRAL);

event called when client thread finishes

Protected procedure SetAuthentication(AValue: TRALAuthClient);
 
Protected procedure SetBaseURL(AValue: TStrings);
 
Protected procedure SetConnectTimeout(const AValue: IntegerRAL); virtual;
 
Protected procedure SetEngineType(AValue: String);
 
Protected procedure SetKeepAlive(AValue: boolean); virtual;
 
Protected procedure SetRequestTimeout(AValue: IntegerRAL); virtual;
 
Protected procedure SetUserAgent(AValue: StringRAL); virtual;
 
Protected procedure UnLockSession;
 

Properties

Published property Authentication: TRALAuthClient read FAuthentication write SetAuthentication;
 
Published property BaseURL: TStrings read FBaseURL write SetBaseURL;
 
Published property CompressType: TRALCompressType read FCompressType write FCompressType;
 
Published property ConnectTimeout: IntegerRAL read FConnectTimeout write FConnectTimeout default 5000;
 
Published property CriptoOptions: TRALCriptoOptions read FCriptoOptions write FCriptoOptions;
 
Published property Engine: StringRAL read FEngine;
 
Published property EngineType : String read FEngineType write SetEngineType;
 
Protected property IndexUrl: IntegerRAL read FIndexUrl write FIndexUrl;
 
Published property KeepAlive: boolean read FKeepAlive write SetKeepAlive;
 
Published property OnResponse: TRALThreadClientResponse read FOnResponse write FOnResponse;
 
Public property Request: TRALRequest read FRequest;
 
Published property RequestTimeout: IntegerRAL read FRequestTimeout write SetRequestTimeout default 30000;
 
Published property UserAgent: StringRAL read FUserAgent write SetUserAgent;
 


GitHub Repository
Generated by PasDoc 0.16.0.