- There can only be one instance of an object that processes messages per application โ all messages must be sent to a singular processor.
- The message processor should have the ability to filter messages based on object type and at least one other filtering mechanism.
- There needs to be ability for many objects to send a message
- There needs to be an ability for any object to receive a message.
- A message must minimally contain a string message.
- A message must be able to optionally contain an object payload.
- Implement a basic message that contains a string message
- Implement an error message that contains an error level of high medium or low
- Implement a timestamped message that can report what time the message was created
- Implement a message with a payload of an object.
- Implement a message sender
- Implement a message receiver that can write received messages to disk
- Implement a message reciever that only writes error messages that are of level high.
- Use at least 3 design patterns of the following five:
Singleton Design Pattern
,Chain of Responsibility
,Observer pattern
,Decorator pattern
, andBuilder pattern
.
hydrologicengineeringcenter / wlogger Goto Github PK
View Code? Open in Web Editor NEWAn API for sending and receiving messages.