Back to bricks list
Introduction Getting Started
Architecture
Technical Documentation
Other Classes
AbstractDbManager AgentFactory AudioView AuthService BadRequestException BarPlotView Base BaseEnvShell BaseHTTPException BaseModelDTO BaseTestCase BaseTestCaseLight BashCodeParam BoolParam BoolRField BoolValidator BoxPlotView BrickMigration BrickService CheckBeforeTaskResult CommunityService Compress CondaShellProxy Config ConfigParams Connector ConnectorPartSpec ConnectorSpec ConverterRunner Credentials CredentialsDataBasic CredentialsDataLab CredentialsDataOther CredentialsDataS3 CredentialsParam CredentialsType CurrentUserService Dashboard DashboardType DataframeAggregatorHelper DataframeDataFilterHelper DataframeFilterHelper DataFrameRField DataframeScalerHelper datetime DateTimeUTC DbConfig DictRField DictValidator DispatchedMessage DynamicInputs DynamicOutputs EntityNavigator EntityNavigatorNote EntityNavigatorResource EntityNavigatorScenario EntityNavigatorService EntityNavigatorView EntityTag EntityType Enum ExceptionHandler ExceptionResponse ExpressionBuilder ExternalApiService ExternalSpaceCreateFolder FileDownloader FileHelper FileRField FloatParam FloatRField FloatValidator ForbiddenException FrontService FrontTheme FSNodeModel FsNodeService GwsCorePackages GWSException GzipCompress HeatmapView HistogramView ImageView InPort Inputs InputSpec InputSpecs InterfaceSpec IntParam IntRField IntValidator IO IOface Job JsonCodeParam JSONField JSONView JuliaCodeParam KVStore LazyViewParam LinePlot2DView ListParam ListRField ListValidator Logger LoggerMessageObserver MailService MambaShellProxy MessageDispatcher MessageLevel MessageObserver Model ModelRfield ModelService Monitor MonitorService MultiViews NetworkView Note Notebook NoteParam NoteSearchBuilder NoteService NoteTemplate NoteTemplateParam NoteTemplateService NotFoundException NumericHelper NumericParam NumericValidator OpenAiChat OpenAiChatMessage OpenAiChatParam OpenAiHelper OutPort Outputs OutputSpec OutputSpecs PackageHelper Paginator ParamSet ParamSpec PerlCodeParam PipShellProxy PlotlyRField PlotlyView PoolDb Port PrimitiveRField Process ProcessFactory ProcessModel ProcessProxy ProcessSpec ProgressBar ProgressBarMessageObserver ProgressBarService ProtocolModel ProtocolProxy ProtocolService ProtocolTyping PythonCodeParam Queue QueueService RCodeParam Requests ResourceDownloaderBase ResourceModel ResourceOrigin ResourceRField ResourceSearchBuilder ResourceService ResourceTransfertService ResourceTyping RField RichText RichTextBlock RichTextBlockModificationDTO RichTextBlockModificationWithUserDTO RichTextBlockType RichTextDTO RichTextFigureData RichTextFileData RichTextFormulaData RichTextListData RichTextListItem RichTextModificationDifferenceDTO RichTextModificationsDTO RichTextModificationType RichTextNoteResourceViewData RichTextObjectType RichTextParagraphData RichTextParagraphHeaderData RichTextParagraphHeaderLevel RichTextParagraphListData RichTextParagraphListItemData RichTextParagraphText RichTextResourceViewData RichTextTimestampData RichTextUserDTO RichTextVariableData RichTextView RichTextViewFileData S3Bucket ScatterPlot2DView Scenario ScenarioCreationType ScenarioProcessStatus ScenarioProxy ScenarioRunService ScenarioSaveDTO ScenarioSearchBuilder ScenarioService ScenarioStatus ScenarioTemplate ScenarioTemplateFactory ScenarioTransfertService SearchBuilder SerializableObjectJson SerializableRField Settings ShellProxy ShellProxyFactory SimpleTextView SpaceFolder SpaceService SqlMigrator StackedBarPlotView StreamlitApp StreamlitAppManager StreamlitProcess StringHelper StrParam StrRField StrValidator SysProc TableAnnotatorHelper TableColumnSelector TableColumnTagToRowExtractor TableColumnTagUnfolder TableConcatHelper TableHeaderInfo TableOperationHelper TableRowSelector TableRowTagToColumnExtractor TableRowTagUnfolder TableScalerHelper TableTagAggregatorHelper TableUnfolderHelper TableView TabularView Tag TagHelper TagKeyModel TagList TagService TagsParam TagValueModel TarCompress TarGzCompress TaskFileDownloader TaskHelper TaskInputs TaskModel TaskProxy TaskRunner TaskService TaskTyping TechnicalInfo TextParam TextView TextViewData Typing TypingDeprecated TypingIconColor TypingIconType TypingManager TypingStyle UnauthorizedException URLValidator User UserCredentialsDTO UserGroup UserService Utils UUIDRField Validator VennDiagramView Version View ViewConfig ViewTester ViewType YamlCodeParam ZipCompress
Version

MessageDispatcher

Class to dispatch messages to observers. It has a built in buffer to merge messages and dispatch them in a single call to the observers.

:return: description :rtype: type

Attributes
interval_time_dispatched_buffer: floatinterval_time_merging_message: floatmessage_level: MessageLevelprefix: str
Functions
__INIT__

Initialize self. See help(type(self)) for accurate signature.

Parameters:
NameTypeDefault valueDescription
interval_time_merging_messagefloat 0.1
interval_time_dispatched_bufferint 1
log_levelMessageLevel INFO
prefixstr
parent_dispatcherMessageDispatcher
ATTACH

Attach the listener method and return an id to detach it later

Parameters:
NameTypeDefault valueDescription
observerMessageObserver
ATTACH_PROGRESS_BAR

Attach a progress bar to update task messages when a message is sent. return an id to detach it later

Parameters:
NameTypeDefault valueDescription
progress_barProgressBar
Return type:
ProgressBarMessageObserver
CREATE_SUB_DISPATCHER

Create a sub dispatcher with the same configuration as the current dispatcher. The message will be forwarded to the parent dispatcher after prefix and log level modification. This is useful to override the prefix or the log level for a specific part of the code without affecting the parent dispatcher.

Parameters:
NameTypeDefault valueDescription
log_levelOptional
prefixOptional
DETACH
Parameters:
NameTypeDefault valueDescription
observerMessageObserver
FORCE_DISPATCH_WAITING_MESSAGES
HAS_OBSERVERS
HAS_PARENT_DISPATCHER
Return type:
bool
NOTIFY_DEBUG_MESSAGE

Trigger a debug in each subscriber.

Parameters:
NameTypeDefault valueDescription
messagestr
NOTIFY_ERROR_MESSAGE

Trigger a error in each subscriber.

Parameters:
NameTypeDefault valueDescription
messagestr
NOTIFY_INFO_MESSAGE

Trigger an info in each subscriber.

Parameters:
NameTypeDefault valueDescription
messagestr
NOTIFY_MESSAGE

Trigger a message in each subscriber.

Parameters:
NameTypeDefault valueDescription
messageDispatchedMessage
NOTIFY_PROGRESS_VALUE

Trigger an update in each subscriber.

Parameters:
NameTypeDefault valueDescription
progressfloat
messagestr
NOTIFY_SUCCESS_MESSAGE

Trigger a success in each subscriber.

Parameters:
NameTypeDefault valueDescription
messagestr
NOTIFY_WARNING_MESSAGE

Trigger a warning in each subscriber.

Parameters:
NameTypeDefault valueDescription
messagestr