Skip to main content

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


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

PaScaL



Stefan Groschupf <sg@xxxxxxxxxxxxxxx>
Sent by: eclipse-dev-admin@xxxxxxxxxxx

04/12/2004 02:35 PM

Please respond to
eclipse-dev

To
eclipse-dev@xxxxxxxxxxx
cc
Subject
[eclipse-dev] osgi AbstractURLStreamHandlerService





Hi,
i wish to use the org.eclipse.core.runtime.urlHandlers extension point.
As documented in the osgi documentation i implement the  
AbstractURLStreamHandlerService.
However my protocol is unknown. What is going wrong? Do i miss
something or could that be a osgi implementation related problem?
Does someone use successfully the new url handler mechanism?


mac os x 10.3.3
apple jdk 1.4.2
eclipse 3 m 8

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


my implementation:
package net.sf.jstaff;

import java.io.IOException;
import java.net.URL;
import java.net.URLConnection;

import org.jboss.net.protocol.resource.ResourceURLConnection;
import org.osgi.service.url.AbstractURLStreamHandlerService;


public class JbossResourceURLStreamHandler extends
AbstractURLStreamHandlerService {

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

}

Thanks for any hints!
Stefan


---------------------------------------------------------------
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