Collector State Pattern
Description: The Collector State design pattern is a behavioral design pattern used in real-time software to manage scenarios where a sequence of messages needs to be collected before initiating further actions. Key elements include:
- Collected Message Handler: Receives and processes messages, starts and stops timers, and decides when the collection is complete.
- Timeout Handler: Manages timeout events, determining the status of the collection (success or failure).
This pattern is particularly useful in situations like digit collection for call routing, where messages are collected and processed based on specific conditions and timeouts.
References:
Acceptance Criteria:
- Implement the basic structure of the Collector State design pattern, including the Collected Message Handler and Timeout Handler.
- Provide a working example demonstrating the usage of the Collector State pattern with unit tests to ensure functionality.
- Ensure the implementation adheres to the project's contribution guidelines as outlined in the java-design-patterns wiki.
I guess, I can do this. What is the deadline then? I usually have 2 hr free time per day.
@zhexuany there are no deadlines. Take your time and create a pull request when you're ready for review. Let us know if you need help via this issue or Gitter.
@iluwatar Nice. I will work on this issue when I am free. ;)
@zhexuany are you making progress?
This issue is free for taking again.
Hey, @iluwatar looks like nobody commented to take this issue up.
But I can see that @Mediocrity7 started working on this thing, and @Laurels7 has already submitted a PR #1769 for this, what should we be doing?
To me, it seems the consensus is that we should review the PR made by @Laurels7 here https://github.com/iluwatar/java-design-patterns/pull/1769
Updated link to the pattern description: https://www.eventhelix.com/design-patterns/collector-state/
Hi, may I attempt to get this working? It will take a little time though.
@iluwatar I was looking through the past progress of this issue, and was wondering if I could get an elaboration on what you meant by "threaded messages that sends multiple stateless messages" - https://github.com/iluwatar/java-design-patterns/pull/1769/commits/1324c0d0753f1af0a816172c4eb847cad2f8c4b1#r643438460
@DoopTheSoup the message passing mechanism is one of the core parts of this pattern. I think there should be the sender and the message collector components. I suggest that you take a look how this has been implemented in producer-consumer pattern.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.