org.geotools.catalog.defaults
Class DefaultServiceFinder

java.lang.Object
  extended byorg.geotools.catalog.defaults.DefaultServiceFinder
All Implemented Interfaces:
ServiceFinder

public class DefaultServiceFinder
extends java.lang.Object
implements ServiceFinder

A default service factory which uses the SPI classpath plugin lookup mechanism to locate service extension plugins.

Since:
0.6

Constructor Summary
DefaultServiceFinder(Catalog catalog)
           
 
Method Summary
 java.util.List aquire(java.util.Map params)
          This will create a new IService magically.
 java.util.List aquire(java.net.URI target)
          Aquire IService handles generated by all ServiceExtentions that think they can handle the provided target url.
 java.util.List aquire(java.net.URI id, java.util.Map params)
          This methos is intended to be used when replacing an IService entry in a catalog, or for cloning.
 java.util.List getServiceFactories()
          This method uses the current classpath to look for instances of ServiceFactory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultServiceFinder

public DefaultServiceFinder(Catalog catalog)
Method Detail

aquire

public java.util.List aquire(java.net.URI id,
                             java.util.Map params)
Description copied from interface: ServiceFinder
This methos is intended to be used when replacing an IService entry in a catalog, or for cloning. This allows you to retain the URI id, while providing new parameters. This is also intended for persistence frameworks to use. WARNING: This may have undesired results/conflicts when added to a ICatalog if care is not taken when using this method.

Specified by:
aquire in interface ServiceFinder
Parameters:
id -
params -
Returns:
List

aquire

public java.util.List aquire(java.util.Map params)
Description copied from interface: ServiceFinder
This will create a new IService magically. In some cases sensible default parameters may be added, in addition to parameters removed. An ID will be generated.

Specified by:
aquire in interface ServiceFinder
Parameters:
params -
Returns:
List

aquire

public java.util.List aquire(java.net.URI target)
Aquire IService handles generated by all ServiceExtentions that think they can handle the provided target url.

Note: Just because a target is created does NOT mean it will actually work. You can check the handles in the usual manner (ask for their info) after you get back this list.

Specified by:
aquire in interface ServiceFinder
Parameters:
target -
Returns:
See Also:
net.refractions.udig.catalog.IServiceFactory#aquire(java.net.URL)

getServiceFactories

public java.util.List getServiceFactories()
This method uses the current classpath to look for instances of ServiceFactory. Sublcasses should overide this method if they wish to use a diffent plug-in mechanism.

Returns:
A list of ServiceFactory plugins, or an empty list if none could be found.


Copyright © GeoTools. All Rights Reserved.