speaking of protocols project hansa commes to mind.. have a look at http://wiki.ops4j.org/confluence/display/ops4j/Hansa .. Toni
Stuart McCulloch schrieb: > On 27/07/07, Alin Dreghiciu <[EMAIL PROTECTED]> wrote: > >> Sounds resonable. I still have to figure out which one is a relative file >> reference so I can make an assumption as: >> >> 1. if the entry contains :// then I consider it protocol based >> 2. if the entry does not contain :// then it is a direct file reference and >> 2.1 starts it does not start with \ / ?: then is a relative file >> 2.2 otherwise is absolute. >> >> > > :// is only for net based paths (see http://www.ietf.org/rfc/rfc2396.txt) > > how about: > > 1. use entry to create URI object - compare scheme against known handlers > 1.1 can then handle as appropriate, using URI object to parse details > 2. else use entry to create a File object - see if the referenced file > exists > 2.1 (this should provide both absolute and relative path support?) > 3. else report as unknown URI? > > ideally you should leverage the URI/URL processing and parsing in the JDK. > > >> Right? >> >> Alin >> >> >> On 7/27/07, Stuart McCulloch < [EMAIL PROTECTED]> wrote: >> >>> On 27/07/07, Alin Dreghiciu < [EMAIL PROTECTED]> wrote: >>> >>>> Hi guys, >>>> >>>> I renamed the bundleset concept to scanner, but this is just >>>> >> informative. >> >>>> The wondering is about the following: >>>> Currently I implemented a scanner that can take a plain text file >>>> >> containing >> >>>> on each line a bundle to be deployed. The current approach is that each >>>> >> file >> >>>> of this type contains references to bundles of the same type fo example >>>> >> a >> >>>> file containing bundles specified by an url will contain: >>>> >>>> http://server1/bundl1.jar >>>> https://server2/bundle2.jar >>>> >>>> >>>> and one containing absolute files will contain >>>> >>>> D:\bundle1.jar >>>> D:\bundle2.jar >>>> >>>> The question is: Do you thing that is more appropriate to allow to >>>> >> actually >> >>>> mix any known type of bundles references in one file so you couls have a >>>> file containing for example: >>>> >>>> >>>> http://server1/bundl1.jar >>>> https://server2/bundle2.jar >>>> file://D:\bundle3.jar >>>> maven://group:artifact:version >>>> classpath://bundle4.jar >>>> relative://org/ops4j/bundle5.jar >>>> >>>> I like more the latest option since it gives more flexibility but it >>>> >> adds up >> >>>> the fact that one will have to specify the protocol in fron of each >>>> >> bundle >> >>>> reference. >>>> >>>> WDYT? >>>> >>> I prefer the last one as it means you can mix+match easily >>> >>> btw, you could assume an entry without a protocol is file-based, which >>> makes things a bit simpler for the most common use-case, and avoids >>> the the 'relative' protocol - alternatively a 'file:' entry that doesn't >>> >> start >> >>> with /, \ or D:, etc... could be considered relative? >>> >>> >>>> Alin >>>> ______________________________ _________________ >>>> general mailing list >>>> general@lists.ops4j.org >>>> http://lists.ops4j.org/mailman/listinfo/general >>>> >>>> >>>> >>> -- >>> Cheers, Stuart >>> >>> _______________________________________________ >>> general mailing list >>> general@lists.ops4j.org >>> http://lists.ops4j.org/mailman/listinfo/general >>> >>> >> _______________________________________________ >> general mailing list >> general@lists.ops4j.org >> http://lists.ops4j.org/mailman/listinfo/general >> >> >> > > > -- Toni Menzel - Software Developer my blog: http://tonitcom.blogspot.com/ contact: [EMAIL PROTECTED] _______________________________________________ general mailing list general@lists.ops4j.org http://lists.ops4j.org/mailman/listinfo/general