posted 22 years ago
hi,
i have an abstract class let say "Parent" which
implements interface "Clientservice" has some methods
"init()"
"processRequest()"
"Destroy()"
Now i want to have a proxy class for each concret subclass class of "Parent".
I need proxy for each subclass becuase i do not want Client to intract my logical subclasses directly so i need a proxy for each class becuase proxy may contains some of its own logic (which may change) but for client the basic opertation such as "init" "ProcessRequest(.....)" "destroy()" or in future they may be increase(for all subclasses)
which i can do by adding one or more methods in "Client services" interface.
i was woundering would it be ok if i implement "clientservice" interface in proxy class also.
ofcourse proxy will not contain the logical implementation rather providing a same interface to call actual class method.
???
client will one use method which are in "clintservices" interface through Proxy.
is that ok to do?
" can proxy implements the same interface as its surrogated class which it is holding
by doing this it would allow Proxy class to sync with its holding class interms of fuctions client needs to call on holding class"
if any of you understand what i am tring to ask then please comment some thing.
at
thanks.