StandardClassFactory

Overview

This class implements the standard (default) class factory used for creating instances of services in a Remoting SDK server.

For every incoming request to the server, the class factory will create a new instance of the service implementation, let it serve the request and then destroy the instance.

This class factory is recommended for small service instances that are cheap to create and destroy. To use a different instantiation mechanism, look into using one of the other class factory implementations listed below, or create a custom class factory descending from ClassFactory to implement any custom logic you might need.

Location

Instance Methods


constructor

 

constructor(serviceClass: Type; activator: IServiceActivator; enforceSessionCheck: Boolean)

 

StandardClassFactory(Type serviceClass, IServiceActivator activator, Boolean enforceSessionCheck)

 

Sub New(serviceClass As Type, activator As IServiceActivator, enforceSessionCheck As Boolean)

Parameters:

  • serviceClass:
  • activator:
  • enforceSessionCheck:

AcquireInstance

Acquires a new Service instance that can be used to execute a remote service call, based on the logic of the class factory implementation.

 

method AcquireInstance(clientId: Guid): IROService

 

IROService AcquireInstance(Guid clientId)

 

Function AcquireInstance(clientId As Guid) As IROService

Parameters:

  • clientId:

ActivateInstance  protected    (declared in ClassFactory)

 

method ActivateInstance(clientId: Guid; instance: IROService)

 

void ActivateInstance(Guid clientId, IROService instance)

 

Sub ActivateInstance(clientId As Guid, instance As IROService)

Parameters:

  • clientId:
  • instance:

CreateInstance    (declared in ClassFactory)

 

method CreateInstance: IROService

 

IROService CreateInstance()

 

Function CreateInstance() As IROService

DeactivateInstance  protected    (declared in ClassFactory)

 

method DeactivateInstance(clientId: Guid; instance: IROService)

 

void DeactivateInstance(Guid clientId, IROService instance)

 

Sub DeactivateInstance(clientId As Guid, instance As IROService)

Parameters:

  • clientId:
  • instance:

ReleaseInstance

Releases a previously acquired service instance, based on the logic of the class factory implementation.

 

method ReleaseInstance(clientId: Guid; instance: IROService)

 

void ReleaseInstance(Guid clientId, IROService instance)

 

Sub ReleaseInstance(clientId As Guid, instance As IROService)

Parameters:

  • clientId:
  • instance: