Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #33873
| Newsgroups | comp.lang.java.programmer |
|---|---|
| Date | 2016-02-24 12:31 -0800 |
| References | <12be97a8-deb6-4684-a352-e01c3fd48285@googlegroups.com> <naj0rg$12k0$1@gioia.aioe.org> <f2327b98-10be-47ca-87c8-939228161ffb@googlegroups.com> <naktnd$9ei$1@dont-email.me> |
| Message-ID | <cf90200d-73df-40d9-8a90-3b71fd69e67e@googlegroups.com> (permalink) |
| Subject | Re: Implementing FileSystem without MANIFEST.MF/META-INF/services |
| From | david.raver@gmail.com |
On Wednesday, February 24, 2016 at 7:48:29 PM UTC+1, Martin Gregorie wrote: > But you can provide the equivalent of a login command that prompts the > user for the URI as well as authentication details, e.g. user name, > password. This has nothing with any sort of logging in. > > The platform would initialize everything except the FileSystem before > >handing control to the user. > > The user issues the login command, which accepts the URI and > authentication details from the user. And it has nothing with the way URI data is passed to add fro. > Once the user has been authenticated login command would then get the > FileSystem instance using a class name that's related to the the user- > supplied URI[1], carry out FileSystem-specific initialisation and then > hand control back to the user. > > You'd also need a logout equivalent to cleanly shut down and disconnect > the FileSystem when the user wants to quit and/or change FilingSystems. > > [1] Its your job to specify the relationship between URI and class name > and implement a mechanism for storing them and retrieving the class name > for any valid URI and calling Class.forName() to obtain a FileSystem > instance. Since you've said there's a relationship between URI and class > name but given no additional details we can't say anything more about > that. That's right. It's my job to specify the relationship, not the user's/client's. So this rules out the Class.forName() on the user's/client's side, right? The client should be oblivious of the implementing class itself. The only thing the user/client is required to know is the structure of the URI. After that, the FileSystem (regardless of the actual implementing class) can be obtained by calling FileSystems.getFileSystem(URI). All I want is to know if that's possible. And if it is, how it can be done.
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
Implementing FileSystem without MANIFEST.MF/META-INF/services david.raver@gmail.com - 2016-02-23 11:41 -0800
Re: Implementing FileSystem without MANIFEST.MF/META-INF/services Arne Vajhøj <arne@vajhoej.dk> - 2016-02-23 20:26 -0500
Re: Implementing FileSystem without MANIFEST.MF/META-INF/services david.raver@gmail.com - 2016-02-24 00:14 -0800
Re: Implementing FileSystem without MANIFEST.MF/META-INF/services Martin Gregorie <martin@address-in-sig.invalid> - 2016-02-24 18:45 +0000
Re: Implementing FileSystem without MANIFEST.MF/META-INF/services david.raver@gmail.com - 2016-02-24 12:31 -0800
csiph-web