Design Mode - Data Transfer Mode

background

  1. There are different types of messages
  2. Different types of messages that need to be consume different member

achieve

Here Insert Picture Description

  1. DataType: data type, contains a reference to a data transmission, Databus
  2. AbstractDataType: abstract data type, used to set the data transmission train
  3. StoppingData: a specific message type, the message is stopped
  4. StartingData: a specific message type, the message begins
  5. Member: consumer interface for receiving DataType, that is, consumer events
  6. MessageCollectorMember: concrete realization consumers, it has its own internal logic implementation
  7. StatusMember: specific consumer event consumer
  8. DataBus: sender events, internal maintains a list of a set of consumers. Contains subscribe and unsubscribe to consumers, as well as publishing events, publishing events to achieve achieved through a list of consumers
Published 379 original articles · won praise 349 · views 940 000 +

Guess you like

Origin blog.csdn.net/ZHOUCHAOQIANG/article/details/103963358
Recommended