posted 10 years ago
Hi all,
I have a requirement where we call another system and have to prepare the corresponding request from our request.
Let us call classes - OurRequest, DownstreamCallRequest, DownstreamRequestAdapter
DownstreadmRequestAdapter has a method : public DownstreamRequest adapt(OurRequest ourRequest) signature.
I don't have any state variables in the Adapter class.
What will be a better OO design?
1. To have the adapter class with 'static' method - public static DownstreamRequest adapt(OurRequest ourRequest)
2. To have the adapter class with an instance adapt method but no state variables in the class
Appreciate your opinion on this.
Thanks
Maulin