Namespace: Friflo.Json.Fliox.Hub.Host
Assembly: Friflo.Json.Fliox.Hub
A FlioxHub act as a Proxy between a FlioxClient or a web browser and an EntityDatabase.
[CLSCompliant(true)]
public class FlioxHub : IDisposable, ILogSource
Inheritance: object → FlioxHub
Attributes: CLSCompliantAttribute
Implements: IDisposable,ILogSource
The FlioxHub features and utilization is available atWhen creating a FlioxHub a is assigned to the instance and all tasks requested by a client are applied to this database. A FlioxHub can be configured to support:
A FlioxHub instance handle client requests by its ExecuteRequestAsync(SyncRequest, SyncContext) method. A request is represented by a SyncRequest and its tasks are executed on the given database. If database == null the default database of FlioxHub is used.The tasks contains all database operations like create, read, upsert, delete and all messages / commands send by a client. The FlioxHub execute these tasks by the service of the specified database.Instances of FlioxHub are enabling multiple clients e.g. FlioxClientoperating on the same FlioxHub instance. To maintain thread safety FlioxHub implementations must not have any mutable state.
Name | Description |
---|---|
FlioxHub(EntityDatabase, SharedEnv) | Construct a FlioxHub with the given default database . |
Name | Description |
---|---|
database | The default database assigned to the FlioxHub |
sharedEnv |
Name | Description |
---|---|
Authenticator | An Authenticator performs authentication and authorization for alltasks in a SyncRequest sent by a client. All successful authorized tasks are executed by the service. |
ClientController | ClientController is used to create / add unique client ids to enable sending events to specific user clients. It also enables monitoring execution statistics of ExecuteRequestAsync(SyncRequest, SyncContext) |
EventDispatcher | An optional EventDispatcher used to enable Pub-Sub. If assigned the database send push events to clients for database changes and messages these clients have subscribed. |
FlioxVersion | |
HostName | On server side the name can be used to identify a specific host if used within a cluster of servers.On client side any name can be assigned to simplify differentiation if using multiple FlioxHub instances. |
HostVersion | host HostVersion - available via command |
Info | General descriptive Hub information - available via command |
Logger |
Name | Description |
---|---|
AddExtensionDB(EntityDatabase) | Add an extensionDB to the Hub. The extension database is identified by itsnameShort |
Dispose() | |
ExecuteRequest(SyncRequest, SyncContext) | Execute all tasks of a SyncRequest send by client. |
ExecuteRequestAsync(SyncRequest, SyncContext) | Execute all tasks of a SyncRequest send by client.Method is thread-safe as multiple FlioxClient instances are allowed to use a single FlioxHub instance. |
GetFeature<TFeature>() | |
InitSyncRequest(SyncRequest) | Before execution of a SyncRequest with ExecuteRequestAsync(SyncRequest, SyncContext) or ExecuteRequest(SyncRequest, SyncContext)the SyncRequest must be initialized. If the request can be executed synchronously the method returns SyncDoing so avoids creation of a redundant Task instance. |
QueueRequestAsync(SyncRequest, SyncContext) | |
SetFeature<TFeature>(TFeature) | |
ToString() | |
TryGetDatabase(string, EntityDatabase) | |
TryGetFeature<TFeature>() |
Documentation generated by MdDocs