Joshua Jimenez f903d7e9a9 #496 Pipeline pattern (#967)
* #496 Add pipeline module to parent pom 

* #496: Add main application class and test for pipeline

* #496: Checkstyle format and add log messages on pipeline stages 🎨

* #496: Fill readme sections of pipeline 

* #496: Javadocs and checkstyle formatting 🎨

* #496: Follow PMD checks and add more explanation as block comment on App.java

* #496: Apply requested PR changes by iluwatar 🎨
2019-10-08 09:19:28 +03:00

1.5 KiB

layout, title, folder, permalink, categories, tags
layout title folder permalink categories tags
pattern Pipeline pipeline /patterns/pipeline/ Behavioral
Java
Functional
Difficulty-Intermediate

Intent

Allows processing of data in a series of stages by giving in an initial input and passing the processed output to be used by the next stages.

Applicability

Use the Pipeline pattern when you want to

  • execute individual stages that yields a final value
  • add readability to complex sequence of operations by providing a fluent builder as an interface
  • improve testability of code since stages will most likely be doing a single thing, complying to the Single Responsibility Principle (SRP)

Typical Use Case

  • implement stages and execute them in an ordered manner

Real world examples

Credits