horda_server library

Classes

ActorEventWsMsg
ActorViewSub
AttributeChange
Base class for changes to attributes attached to referenced entities.
CallCommandResWsMsg
CallCommandWsMsg
Message for calling commands and waiting for responses.
Change
Base class for all view changes in the Horda platform.
ChangeEnvelop
Envelope containing view changes and their routing metadata.
ChangeId
Unique identifier for changes in the distributed message system.
ChangeRecord
Record of a view change with its state version.
CommandEnvelop
Envelope containing a command and its routing metadata.
CompositeId
Identifier composed of two entity IDs for representing relationships.
CounterAttrDecremented
Change representing a counter attribute on a referenced entity being decremented.
CounterAttribute
Counter attribute attached to items in reference views.
CounterAttrIncremented
Change representing a counter attribute on a referenced entity being incremented.
CounterAttrReset
Change representing a counter attribute on a referenced entity being reset.
CounterQueryDef
Query definition for counter views.
CounterQueryResult
Query result for counter views.
CounterView
View that maintains an integer counter that can be incremented, decremented, or reset.
CounterViewChange
Base class for changes to counter views.
CounterViewDecremented
Change representing a decrement operation on a counter view.
CounterViewIncremented
Change representing an increment operation on a counter view.
CounterViewReset
Change representing a reset operation on a counter view.
DateTimeJsonConverter
JSON converter for DateTime objects in the Horda platform.
DispatchEventResWsMsg
DispatchEventWsMsg
Message for dispatching events to trigger business processes.
DurationJsonConverter
JSON converter for Duration objects in the Horda platform.
Entity<S extends EntityState>
Stateful component that represents a business domain entity.
EntityContext
Context provided to entity command handlers during command processing.
EntityHandlers<S extends EntityState>
Registry for entity command handlers and state management.
EntityState
Private state of an entity, read by command handlers and updated by events.
EntityStateMigration
Single migration step for upgrading entity state structure.
EntityStateMigrations
Manages entity state migrations across application versions.
EntityViewGroup
Collection of views that represent queryable data derived from an entity.
EntityViewGroupProjectors
Registry for entity view group projectors.
ErrorWsMsg
EventEnvelop
Envelope containing an event and its metadata.
FlowCallReplyEnvelop
Envelope containing a reply from a business process call.
FlowCallReplyErr
Error reply from a business process call.
FlowCallReplyOk
Successful reply from a business process call.
FlowRunEnvelop
Envelope for triggering business process execution.
FluirErrorEvent
Error event representing a failure in the Horda platform.
InitViewData
Initial data for a view when an entity is first created.
ListItem
A single item in a list view with its position and referenced entity ID.
ListPageChange
Base class for changes to list pages during pagination synchronization.
ListPageCleared
Page sync change representing a list page being cleared.
ListPageItemAdded
Page sync change representing an item added to a list page.
ListPageItemRemoved
Page sync change representing an item removed from a list page.
ListQueryDef
Query definition for list views.
ListQueryDefBuilder
Builder for list view query definitions.
ListQueryResult
Query result for list views.
ListQueryResultBuilder
Builder for list query results.
ListViewChange
Base class for changes to list views.
ListViewCleared
Change representing all items being removed from a list view.
ListViewItemAdded
Change representing an item being added to a list view.
ListViewItemChanged
Change representing an item in a list view being replaced with another.
ListViewItemMoved
Change representing an item in a list view being moved to a new position.
ListViewItemRemoved
Change representing an item being removed from a list view.
Message
Base class for all messages in the Horda platform.
NoViewGroup<E extends RemoteEvent>
Empty view group implementation for entities that don't expose queryable views.
ProcessContext
Context provided to business process handlers during event processing.
ProcessFuncs
Registry for business process event handlers.
ProcessGroup
Business process that orchestrates entities and services to fulfill client requests.
ProcessResult
Result of business process execution.
QueryAndSubscribeWsMsg
Message requesting an atomic query and subscribe operation on an entity's views.
QueryDef
Definition of a query to retrieve entity view data.
QueryDefBuilder
Builder for constructing QueryDef objects programmatically.
QueryListViewChange
Base class for query list view changes.
QueryListViewItemAdded
Change representing an item being added to a query list view with position.
QueryListViewItemRemoved
Change representing an item being removed from a query list view with position.
QueryResult
Result of executing a query against entity views.
QueryResultBuilder
Builder for constructing QueryResult objects programmatically.
QueryResultWsMsg
Message containing the results of a query request.
QueryWsMsg
Message requesting a query on an entity's views.
RefListView<E extends Entity<EntityState>>
View that maintains a list of entity references with attributes.
RefQueryDef
Query definition for reference views.
RefQueryDefBuilder
Builder for reference view query definitions.
RefQueryResult
Query result for reference views.
RefQueryResultBuilder
Builder for reference query results.
RefValueAttributeChanged
Change representing a value attribute on a referenced entity being updated.
RefView<E extends Entity<EntityState>>
View that holds a reference to another entity with optional attributes.
RefViewChange
Base class for changes to reference views.
RefViewChanged
Change representing a new entity reference being set in a reference view.
RemoteCommand
Base class for command messages in the entity-command-event architecture.
RemoteEvent
Base class for event messages in the entity-command-event architecture.
RemoteMessage
Base class for messages that can be serialized and transmitted over the network.
ReplyClient
Information for routing command replies back to clients.
ReplyFlow
Information for routing command replies back to business processes.
SendCommandAckWsMsg
SendCommandWsMsg
Message for sending commands to entities or services.
Service
Stateless component that performs auxiliary tasks to support business processes.
ServiceContext
Context provided to service command handlers during command processing.
ServiceHandlers
Registry for service command handlers.
SubscribeActorResWsMsg
SubscribeActorWsMsg
SubscribeViewsAckWsMsg
SubscribeViewsWsMsg
UnsubscribeActorResWsMsg
UnsubscribeActorWsMsg
UnsubscribeViewsResWsMsg
UnsubscribeViewsWsMsg
ValueQueryDef
Query definition for value views.
ValueQueryDefBuilder
Builder for value view query definitions.
ValueQueryResult
Query result for value views.
ValueQueryResultBuilder
Builder for value query results.
ValueRefAttribute<T>
Typed value attribute attached to items in reference views.
ValueView<T>
View that holds a single typed value that can be queried and updated.
ValueViewChange
Base class for changes to value views.
ValueViewChanged<T>
Change representing a new value being set in a typed value view.
View
Queryable data view derived from entity state.
ViewChangeWsMsg
ViewGroup
Registry for entity views.
ViewQueryDef
Base class for defining queries on specific view types.
ViewQueryDefBuilder
Base class for building view-specific query definitions.
ViewQueryResult
Base class for view-specific query results.
ViewQueryResultBuilder
Base class for building view-specific query results.
ViewSnapshot
Snapshot of a view's current value with version information.
WelcomeWsMsg
Welcome message sent by server after WebSocket connection establishment.
WsMessage
Base class for all WebSocket messages in the Horda platform.
WsMessageBox
Container for WebSocket messages with unique identification.

Extensions

Compare on String
Extension adding comparison operators to String for entity ID ordering.
ListQueryDefBuilderManual on ListQueryDefBuilder
Extension providing convenient methods for list query builders.
ListQueryResultBuilderManual on Map<double, ({QueryResultBuilder query, EntityId refId})>
QueryDefBuilderManual on QueryDefBuilder
Extension providing convenient methods for building query definitions.
QueryResultBuilderManual on QueryResultBuilder
RefQueryDefBuilderManual on RefQueryDefBuilder
Extension providing convenient methods for reference query builders.

Constants

kSingletonId → const String
The constant ID used for all singleton entities.

Properties

kMsgFromJsonFac Map<String, FromJsonFun>
Global registry of message deserialization factories.
final

Functions

kMessageFromJson(String type, Map<String, dynamic> json) → dynamic
kRegisterFluirMessage() → void
kRegisterMessageFactory<T extends Message>(FromJsonFun<T> fun) → void

Typedefs

CommandId = int
Unique identifier for command messages.
EntityHandler<S extends EntityState, C extends RemoteCommand> = Future<RemoteEvent> Function(C command, S state, EntityContext context)
Handler function for entity commands after initialization.
EntityId = String
Unique identifier for entities in the Horda platform.
EntityInitHandler<C extends RemoteCommand, E extends RemoteEvent> = Future<E> Function(C command, EntityContext context)
Handler function for entity initialization commands.
EntityStateInitProjector<E extends RemoteEvent> = EntityState Function(E event)
Function that creates initial entity state from an init event.
EntityViewGroupInit<E extends RemoteEvent> = EntityViewGroup Function(E event)
Function that initializes an EntityViewGroup from an entity init event.
EntityViewGroupProjector<E extends RemoteEvent> = void Function(E event)
Function that projects events to update entity views.
FromJsonFun<T> = T Function(Map<String, dynamic> json)
Function signature for deserializing JSON objects to typed instances.
ProcessFunc<E extends RemoteEvent> = Future<ProcessResult> Function(E event, ProcessContext context)
Handler function for processing business process events.
RefIdNamePair = ({String itemId, String name})
Type alias for identifying attributes attached to referenced entities.
ServiceHandler<C extends RemoteCommand> = Future<RemoteEvent> Function(C command, ServiceContext context)
Handler function for service commands.

Exceptions / Errors

FluirError
Error class for exceptions within the Horda platform.