Quantum 3 3.1.0

Public Member Functions | List of all members
Quantum.ServerSessionFactory Class Reference

Default implementation of the session factory. Required to let the server create the bindings to use for example the command serializer on the context or to run the server simulation. Creates specific implementations that the Quantum server does not have access to. More...

Inherits IDeterministicSessionFactory.

Public Member Functions

 ServerSessionFactory (IAssetSerializer assetSerializer, bool runServerSimulation=false)
 Create the session factory. More...
 
IAssetSerializer CreateAssetSerializer ()
 
IDeterministicSessionContext CreateContext ()
 Creates a ServerSessionContext using the loaded shared resource manager. Returns null when the shared resources were not loaded. More...
 
IDeterministicSessionRunner CreateRunner ()
 Creates a ServerSessionRunner when the factory was created with runServerSimulation, otherwise returns null. More...
 
IDeterministicSharedResources CreateSharedResources ()
 Returns the cached ServerSharedResources instance, creating it on the first call. More...
 

Detailed Description

Default implementation of the session factory. Required to let the server create the bindings to use for example the command serializer on the context or to run the server simulation. Creates specific implementations that the Quantum server does not have access to.

Constructor & Destructor Documentation

◆ ServerSessionFactory()

Quantum.ServerSessionFactory.ServerSessionFactory ( IAssetSerializer  assetSerializer,
bool  runServerSimulation = false 
)
inline

Create the session factory.

Parameters
assetSerializerAsset serializer shared by all rooms, e.g. QuantumJsonSerializer
runServerSimulationCreate a ServerSessionRunner to run the server simulation

Member Function Documentation

◆ CreateContext()

IDeterministicSessionContext Quantum.ServerSessionFactory.CreateContext ( )

Creates a ServerSessionContext using the loaded shared resource manager. Returns null when the shared resources were not loaded.

◆ CreateRunner()

IDeterministicSessionRunner Quantum.ServerSessionFactory.CreateRunner ( )

Creates a ServerSessionRunner when the factory was created with runServerSimulation, otherwise returns null.

◆ CreateSharedResources()

IDeterministicSharedResources Quantum.ServerSessionFactory.CreateSharedResources ( )

Returns the cached ServerSharedResources instance, creating it on the first call.