com.vmware.vise.data.uri
Class UriSchemeInitializer
java.lang.Object
com.vmware.vise.data.uri.UriSchemeInitializer
public final class UriSchemeInitializer
- extends Object
Utility to register a URI scheme with a ResourceTypeResolver
Method Summary |
void |
close()
Clean-up method used as destroy-method in the bean declaration so that
the scheme can be unregistered automatically when the bundle is undeployed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UriSchemeInitializer
public UriSchemeInitializer(ResourceTypeResolverRegistry typeResolverRegistry,
String uriScheme,
ResourceTypeResolver resolver)
- Register a URI scheme with a resource type resolver.
In a Spring environment (i.e. vSphere Web Client app server) you just need
to declare this bean in your plugin's bundleContext.xml. See the SDK chassis-app
sample for more information.
Note that the registration will fail if the scheme is already registered.
- Parameters:
typeResolverRegistry
- The resource type resolver registry.uriScheme
- A URI scheme, or prefix. For instance "acme" or "urn:acme"
(i.e. the scheme can be followed by a namespace).
Note: "urn" alone, "urn:vim25" and "urn:vri" are reserved.resolver
- A ResourceTypeResolver that handles URIs starting with uriScheme.
- Throws:
IllegalArgumentException
- if any parameters are null.
close
public void close()
- Clean-up method used as destroy-method in the bean declaration so that
the scheme can be unregistered automatically when the bundle is undeployed.
Copyright @ 2012 VMware, Inc. All rights reserved.