Class MessageBoard
This implementation implements the IMessageBoard interface for in-process agents.
Implements
Namespace: Agents.Net
Assembly: Agents.Net.dll
Syntax
public sealed class MessageBoard : IDisposable, IMessageBoard
Remarks
This implementation guaranties the following qualities:
- parallelAll agents are executed parallel.
Methods
| Improve this Doc View SourceDispose()
Declaration
public void Dispose()
Publish(Message)
Publish the specific message to all consuming and intercepting agents.
Declaration
public void Publish(Message message)
Parameters
Type | Name | Description |
---|---|---|
Message | message | The message to publish. |
Register(Agent[])
Register the agents to the message board.
Declaration
public void Register(params Agent[] agents)
Parameters
Type | Name | Description |
---|---|---|
Agent[] | agents | Agents to register. |
Remarks
Agents as well as InterceptorAgents are registered with this method.
It can be used after the Start() method, but this should be avoided, as the newly registered agent will not get any messages of the past.
Start()
Start the message board.
Declaration
public void Start()
Remarks
Without executing this method, no message will be passed the any agent. When it is executed it will automatically send an InitializeMessage.