From: Artur Hefczyc <wislaj23@wp...> - 2001-09-25 07:40:16
I am still designing our JavaProtocols package during
creating http implementation and I have some suggestions.
Currently we have package with path:
urls to network resources have form:
I would like to put protocol name in package path:
Particular protocol implementation should always have
So I have proposition to create our structure as following:
for example for HTTP we have package:
And HTTP implementation is in class:
for FTP we have package:
and FTP implementation is in class:
So in this model we can resolve protocol name and
try to load proper class in easy way.
For example for url:
we find "http" protocol name so we load this protocol
implementation with standard method becouse we know
that we must load class:
String proto_name = "http";
If we can't load this class it means that we havn't this
protocol implementation yet. So we should try to load
standard java implementation of given protocol.
However standard java protocols implementation are not compatible
with our classes. So we need to create class which would be bridge
between our design and java sun design.