jaggernat
asked on
JCA - Adapter pattern
Java connector Architecture follows Adapter pattern.
Any explanation on how this occurs with sample code would be helpful
simple explanation in laymans terms plzz!
thanks
J
Any explanation on how this occurs with sample code would be helpful
simple explanation in laymans terms plzz!
thanks
J
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
we have a adaptor class, a client and an adaptee.
the client is trying to call an adaptee which is modified by the adaptor. right?
not exactly sure what the role of client and the adaptee is.
the client is trying to call an adaptee which is modified by the adaptor. right?
not exactly sure what the role of client and the adaptee is.
> the client is trying to call an adaptee which is modified by the adaptor. right?
Yes
> not exactly sure what the role of client and the adaptee is.
client has an interface and adapter doesn't follow that interface. In order to interact with the client, adapter follows the client interface and modify the adpatee (calls its methods) when client wants to do something.
Yes
> not exactly sure what the role of client and the adaptee is.
client has an interface and adapter doesn't follow that interface. In order to interact with the client, adapter follows the client interface and modify the adpatee (calls its methods) when client wants to do something.
ASKER
In Adapter pattern , an adapter wraps a class(target class) in such a way that the client class can call the adaptor to use the target class.
Client --> Adapter/ wrapper class --> Adaptee ( target).
So the client doesnt calls the target object(adaptee) which is an direclty, but invokes the adaptee through the Adapter.
above is my description of adapter pattern. Is it right?
Client --> Adapter/ wrapper class --> Adaptee ( target).
So the client doesnt calls the target object(adaptee) which is an direclty, but invokes the adaptee through the Adapter.
above is my description of adapter pattern. Is it right?
yes
ASKER
thanks