Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-dev] osgi AbstractURLStreamHandlerService

Hi Pascal,

If i understand the message in the equinox newsgroup right, there is no longer an extension point for Url handlers.
The solution with setting the url handlers via api working fine, thanks for the pointer!

Stefan


Am 12.04.2004 um 20:49 schrieb Pascal Rapicault:

This question has already been answered on the equinox newsgroup in the thread named "registering a protocol"

PaScaL





<x-tad-smaller>Stefan Groschupf <sg@xxxxxxxxxxxxxxx></x-tad-smaller><x-tad-smaller> </x-tad-smaller>
<x-tad-smaller>Sent by: eclipse-dev-admin@xxxxxxxxxxx</x-tad-smaller>
<x-tad-smaller>04/12/2004 02:35 PM</x-tad-smaller>
<x-tad-smaller>Please respond to</x-tad-smaller>
<x-tad-smaller> eclipse-dev</x-tad-smaller>
<x-tad-smaller>To</x-tad-smaller>
<x-tad-smaller>eclipse-dev@xxxxxxxxxxx</x-tad-smaller>
<x-tad-smaller>cc</x-tad-smaller>
<x-tad-smaller>Subject</x-tad-smaller>
<x-tad-smaller>[eclipse-dev] osgi AbstractURLStreamHandlerService</x-tad-smaller>
<x-tad-smaller>Hi,</x-tad-smaller>
<x-tad-smaller> i wish to use the org.eclipse.core.runtime.urlHandlers extension point.</x-tad-smaller>
<x-tad-smaller> As documented in the osgi documentation i implement the  </x-tad-smaller>
<x-tad-smaller> AbstractURLStreamHandlerService.</x-tad-smaller>
<x-tad-smaller> However my protocol is unknown. What is going wrong? Do i miss </x-tad-smaller>
<x-tad-smaller> something or could that be a osgi implementation related problem?</x-tad-smaller>
<x-tad-smaller> Does someone use successfully the new url handler mechanism?</x-tad-smaller>


<x-tad-smaller> mac os x 10.3.3</x-tad-smaller>
<x-tad-smaller> apple jdk 1.4.2</x-tad-smaller>
<x-tad-smaller> eclipse 3 m 8</x-tad-smaller>

<x-tad-smaller> from my plugin.xml</x-tad-smaller>
<x-tad-smaller>  <extension</x-tad-smaller>
<x-tad-smaller>          point="org.eclipse.core.runtime.urlHandlers"></x-tad-smaller>
<x-tad-smaller>       <handler</x-tad-smaller>
<x-tad-smaller>             class="net.sf.jstaff.JbossResourceURLStreamHandler"</x-tad-smaller>
<x-tad-smaller>             protocol="resource"></x-tad-smaller>
<x-tad-smaller>       </handler></x-tad-smaller>
<x-tad-smaller>    </extension></x-tad-smaller>


<x-tad-smaller> my implementation:</x-tad-smaller>
<x-tad-smaller> package net.sf.jstaff;</x-tad-smaller>

<x-tad-smaller> import java.io.IOException;</x-tad-smaller>
<x-tad-smaller> import java.net.URL;</x-tad-smaller>
<x-tad-smaller> import java.net.URLConnection;</x-tad-smaller>

<x-tad-smaller> import org.jboss.net.protocol.resource.ResourceURLConnection;</x-tad-smaller>
<x-tad-smaller> import org.osgi.service.url.AbstractURLStreamHandlerService;</x-tad-smaller>


<x-tad-smaller> public class JbossResourceURLStreamHandler extends </x-tad-smaller>
<x-tad-smaller> AbstractURLStreamHandlerService {</x-tad-smaller>

<x-tad-smaller>     /* (non-Javadoc)</x-tad-smaller>
<x-tad-smaller>      * @see java.net.URLStreamHandler#openConnection(java.net.URL)</x-tad-smaller>
<x-tad-smaller>      */</x-tad-smaller>
<x-tad-smaller>     public URLConnection openConnection(URL url) throws IOException {</x-tad-smaller>
<x-tad-smaller>         return new ResourceURLConnection(url);</x-tad-smaller>
<x-tad-smaller>     }</x-tad-smaller>

<x-tad-smaller> }</x-tad-smaller>

<x-tad-smaller> Thanks for any hints!</x-tad-smaller>
<x-tad-smaller> Stefan</x-tad-smaller>


<x-tad-smaller> ---------------------------------------------------------------</x-tad-smaller>
<x-tad-smaller> open technology:   http://www.media-style.com</x-tad-smaller>
<x-tad-smaller> open source:           http://www.weta-group.net</x-tad-smaller>
<x-tad-smaller> open discussion:    http://www.text-mining.org</x-tad-smaller>

---------------------------------------------------------------
open technology: http://www.media-style.com
open source: http://www.weta-group.net
open discussion: http://www.text-mining.org

Back to the top