Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

StreamSec.Snic.ClassClient

Feature notes: Snif remoting framework (concepts)

Classes, interfaces and records

classTsnicClassClient

(no public members)

classTsnicClientStreamInfo

constructor Create(const aMsgID, aClsName, aMtdName, aOwner, aArgName: string; aStream: TStream); destructor Destroy; override; class function FormatID(const aMsgID, aClsName, aMtdName, aOwner, aArgName: string): string;
Delegates to Format, passing 2 argument(s), and returns its result.
property MsgID: string read fMsgID; property ClsName: string read fClsName; property MtdName: string read fMtdName; property ArgName: string read fArgName; property Stream: TStream read fStream;

classEsnicError

inherits from Exception

(no public members)

classEsnicCallback

inherits from EsnicError

(no public members)

classEsnicMethodNotFound

inherits from EsnicCallback

(no public members)

classEsnicMethodOverloaded

inherits from EsnicCallback

(no public members)

classEsnicHandleRequest

inherits from EsnicError

(no public members)

classEsnicNoConnection

inherits from EsnicError

(no public members)

classEsnicReentry

inherits from EsnicError

(no public members)

recordTsnicMethodCall

procedure Call; property Descriptor: TRttiMethod 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;

classTsnicClientCallbackInfo

constructor Create(const aIntf: IInterface; aType: TRttiInterfaceType); function Call(const aMethod: string): TsnicMethodCall; property Name: string read fName;

classTsnicClassClient

inherits from TstBaseComponent

Inherit the standard required-unit suggestion hook and IDE component editor.

constructor Create(AOwner: TComponent); override;
Standard component constructor. Sets up the internal argument-stream and callback registries; an application normally lets the descendant transport component (e.g. TsnipClient) or the IDE own the lifetime, and rarely calls this directly. » member page
destructor Destroy; override;
Releases the argument-stream and callback registries. Does not close the Connection (the connection is owned elsewhere); an app rarely calls this directly - freeing the component does it. » member page
procedure HandleRequest;
Services a single inbound request that the SERVER has pushed to this client - i.e. a callback into one of the interfaces the app passed as a method argument (cActionCall), or a Read/Write against a stream argument the app handed to MakeInstance/SubscribeMediator. Full description »
function MakeInstance(const aQualifiedClassName: string; const aIID : PTypeInfo; out aObj; const aRole : string) : Boolean;
Creates a fresh REMOTE object of aQualifiedClassName on the server and hands back a client-side proxy (a TVirtualInterface) typed as aIID; every method the app calls on aObj is marshalled to the server, executed there, and the (out/var/result) values marshalled back. Full description »
function SubscribeMediator(const aQualifiedClassName: string; const aOwner : string; const aIID : PTypeInfo; out aObj; const aRole : string) : Boolean;
Attaches to an EXISTING shared "mediator" instance on the server rather than creating a new one, returning a proxy typed as aIID. Full description »
function TryGetConnection(out aConnection: IsnipConnection): Boolean;
Returns True and hands back the attached connection in aConnection, or returns False with aConnection nil when none is attached. Full description »
property Username: string read fUsername write SetUsername;
The authenticated user name stamped onto every outgoing request. The server uses it for session ownership and access control (a session can only be re-attached by the same user that opened it). Set it to match the identity the transport authenticated as before making the first proxy call. » member page
property Session: string read fSession write SetSession;
Opening a session is optional. Set Session to an empty string to use session-less connections. Set Session to an arbitrary string, e.g. 'new', to have a new session opened - the server picks the real (random) identifier and the client adopts it, so the next calls attach to that same session. Full description »
property Connection: IsnipConnection read GetConnection write SetConnection;
The transport channel that carries requests/responses to and from the server. An app assigns this to a live IsnipConnection (e.g. from a TsnipClient once its SSH/TLS link is up) before making any proxy call; reading it when no connection has been assigned raises EsnicNoConnection (TryGetConnectio... Full description »

Types (enumerations, sets, aliases)

procTsnipGetConnectionEvent

  TsnipGetConnectionEvent = procedure (Sender     : TObject;
                                       aClient    : TsnicClassClient;
                                   out aConnection: IsnipConnection);

enumTsnicCallReturn

  TsnicCallReturn = (crOK,
                     crFailed,
                     crClassNotFound,
                     crMethodNotFound,
                     crMethodOverloaded,
                     crOther);

typeTsnicMethodCallFunc

  TsnicMethodCallFunc = reference to function (const aCall: TsnicMethodCall): TsnicCallReturn;