plzdontkillme
plzdontkillme

Reputation: 1527

Java Design Pattern for Service to apply method over object

I am looking for a design pattern which will allow my service to process the BufferedImage and than store it to different databases and returns something other object. Is it possible to do so ?

Object processed = imageService.process(bufferedImage)
                .resize(width, height)
                .crop()
                .removeTransparency()
                .saveToDB_A()
                .saveToDB_B()

Upvotes: 0

Views: 41

Answers (1)

Nikem
Nikem

Reputation: 5776

Your example is that of Fluent interface or, if you look at some angle, a Builder pattern.

Upvotes: 1

Related Questions