org.openide.util 8.6.1

org.openide.util
Annotation Type URLStreamHandlerRegistration


@Retention(value=SOURCE)
@Target(value=TYPE)
public @interface URLStreamHandlerRegistration

Replacement for URLStreamHandlerFactory within the NetBeans platform. (The JVM only permits one global factory to be set at a time, whereas various independent modules may wish to register handlers.) May be placed on a URLStreamHandler implementation to register it. Your handler will be loaded and used if and when a URL of a matching protocol is created.

A URLStreamHandlerFactory which uses these registrations may be found in Lookup.getDefault(). This factory is active whenever the module system is loaded. You may also wish to call URL.setURLStreamHandlerFactory(java.net.URLStreamHandlerFactory) from a unit test or otherwise without the module system active.

Since:
org.openide.util 7.31

Required Element Summary
 String[] protocol
          URL protocol(s) which are handled.
 
Optional Element Summary
 int position
          An optional position in which to register this handler relative to others.
 

Element Detail

protocol

public abstract String[] protocol
URL protocol(s) which are handled. URLStreamHandler.openConnection(java.net.URL) will be called with a matching URL.getProtocol().

position

public abstract int position
An optional position in which to register this handler relative to others. The lowest-numbered handler is used in favor of any others, including unnumbered handlers.

Default:
2147483647

org.openide.util 8.6.1

Built on July 5 2011.  |  Portions Copyright 1997-2011 Sun Microsystems, Inc. All rights reserved.