Using instance of Protocols across application layer files
Using instance of Protocols across application layer files
- Subject: Using instance of Protocols across application layer files
- From: "Ramakrishna Kondapalli" <email@hidden>
- Date: Fri, 26 Dec 2003 18:26:30 +0530
- Thread-topic: Using instance of Protocols across application layer files
I want to implement Protocols in my application for hiding the object's
class. I am listing out the program and the problem below.
My objective-c program is supposed to interact with JVM through JNI.
I want to hide the JVM implementation from the application code. I want
to have the interface (protocol) as AFactory to communicate with JVM
through JNIFactory from most of the application layer program files
(objective-c). AFactory will have declarations for specific
implementations of JNIFactory and JNIFactory should conform to AFactory
protocol. I want to do this to keep option of using SOAP at later stage
by creating SOAPFactory, etc.
I want to access JNI/SOAP factories without revealing their identity.
i.e. I want AFactory to get handle of JNI/SOAP factories(based on the
one time instantiation of either of these factories at application
startup) to access them through AFactory (protocol).
I am not aware of any way to use AFactory protocol in the application
layer objective-c files to access JNI/SOAP.
@protocol AFactory
+(AFactory*)getInstance //This is to be used for getting the
instance of JNIFactory
Does anybody have any clue on this?
In short, I need to know, how can we use the instance of a protocol
across the application level files by hiding the actual communication
mechanism (JNI/SOAP).
-------------------------------------------------------
Thanks & Regards,
Ramakrishna,
Artesia CCFM,
Kanbay Software (I) Pvt. Ltd.,
A-1, Technology Park, MIDC,
Talwade, Pune 412 114.
India.
Phone : (91)20 - 760 1000 Ext: 1625
Email : email@hidden <
mailto:email@hidden>
Website : www.kanbay.com <
http://www.kanbay.com/>
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.