Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

StreamSec.Snif.Descriptors

Feature notes: Snif remoting framework (concepts)

Classes, interfaces and records

classEsnifDescriptor

inherits from EsnifError

Re-parented on EsnifError (StreamSec.Snif.Conversion) so that a single handler catches the whole snif layer; existing handlers for EsnifDescriptor and its descendants are unaffected.

(no public members)

classEsnifMethodNotFound

inherits from EsnifDescriptor

(no public members)

classEsnifMethodOverloaded

inherits from EsnifDescriptor

(no public members)

classEsnifPublishedClass

inherits from EsnifDescriptor

A published class does not meet the requirements of the attributes it carries: no parameterless constructor, a Reset that is not a plain method, or a MediatorKind that its InstanceKind cannot support.

(no public members)

classTsnifClassDescriptor

(no public members)

classTsnifObjectDescriptor

constructor Create(aDescr: TsnifClassDescriptor; aObject, aMediator: TObject); destructor Destroy; override; function GetObject: TObject;
Returns the current value of the fObject field.
function GetMediator: TObject;
Returns the current value of the fMediator field.
procedure Release; procedure UnMediate;

classTsnifMethodDescriptor

(no public members)

recordTsnifMethodCall

function Call: Boolean;
Delegates to fMethod.Call, forwarding fObject, fArgs, fResult, fHasRole and fAsColleague, and returns its result.
property Descriptor: TsnifMethodDescriptor read fMethod; property Args[const aName: string]: TValue read GetArgs write SetArgs; property ArgsByIndex[aIndex: Integer]: TValue read GetArgsByIndex write SetArgsByIndex; property ArgNames[aIndex: Integer]: string read GetArgNames; property ArgCount: Integer read GetArgCount; property Result: TValue read fResult;

classTsnifMethodDescriptor

constructor Create(aMethod: TRttiMethod); destructor Destroy; override; class function CheckParams(aMethod: TRttiMethod): Boolean; function Call(aObject : TObject; const aArgs : array of TValue; out aResult : TValue; const aHasRole : TsnifHasRoleMethod; aAsColleague: Boolean) : Boolean; overload; function Call(aObject : TObject; const aHasRole : TsnifHasRoleMethod; aAsColleague: Boolean) : TsnifMethodCall; overload; function ReturnsToCaller(aIndex: Integer): Boolean;
True when parameter aIndex can carry a value BACK to the caller, i.e. it is declared var or out. A by-value or const parameter cannot: the callee may not change what the caller sees, so returning it in the response says nothing the caller did not already send. Full description »
property Name: string read fName; property Roles: TStrings read fRoles; property ColleagueRoles: TStrings read fColleagueRoles; property RttiMethod: TRttiMethod read fMethod;

classTsnifClassDescriptor

constructor Create(aClass: TClass); destructor Destroy; override; function CreateOrAcquireObject(aMediator: TObject): TsnifObjectDescriptor; procedure FreeOrReleaseObject(aObject: TsnifObjectDescriptor); procedure GetAllRoles(aRoles: TStrings); function CheckAccess(const aHasRole: TsnifHasRoleMethod; aColleague: Boolean): Boolean; function ColleagueRole(const aHasRole: TsnifHasRoleMethod): string; function GetMethods(const aName: string): TArray<TsnifMethodDescriptor>; function Call(aObject : TObject; const aMethod : string; const aArgs : array of TValue; out aResult : TValue; const aHasRole : TsnifHasRoleMethod; aAsColleague: Boolean) : Boolean; overload; function Call(aObject : TObject; const aMethod : string; const aHasRole : TsnifHasRoleMethod; aAsColleague: Boolean) : TsnifMethodCall; overload; property Name: string read fName; property Kind: TsnifInstanceKind read fKind; property Roles: TStrings read fRoles; property MediatorKind: TsnifMediatorKind read fMediatorKind; property Anonymous: Boolean read fAnonymous;

Types (enumerations, sets, aliases)

procTsnifHasRoleMethod

  TsnifHasRoleMethod = function (const aRoleName: string): Boolean of object;