📄 package-summary.html
字号:
<TD COLSPAN=2><FONT SIZE="+2"><B>Exception Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../org/geotools/factory/FactoryNotFoundException.html" title="class in org.geotools.factory">FactoryNotFoundException</A></B></TD><TD>Thrown when a factory can't be found in the registery.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../org/geotools/factory/FactoryRegistryException.html" title="class in org.geotools.factory">FactoryRegistryException</A></B></TD><TD>Thrown when a factory can't be found or can't be instantiate.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../org/geotools/factory/RecursiveSearchException.html" title="class in org.geotools.factory">RecursiveSearchException</A></B></TD><TD>Thrown when <A HREF="../../../org/geotools/factory/FactoryRegistry.html" title="class in org.geotools.factory"><CODE>FactoryRegistry</CODE></A> is invoked recursively for the same category. </TD></TR></TABLE> <P><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Error Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD WIDTH="15%"><B><A HREF="../../../org/geotools/factory/FactoryConfigurationError.html" title="class in org.geotools.factory">FactoryConfigurationError</A></B></TD><TD><B>Deprecated.</B> <I>This error was used by <A HREF="../../../org/geotools/factory/FactoryFinder.html" title="class in org.geotools.factory"><CODE>FactoryFinder</CODE></A>. </I></TD></TR></TABLE> <P><A NAME="package_description"><!-- --></A><H2>Package org.geotools.factory Description</H2><P>Utility classes which enable dynamic binding to factory implementations at runtime. <P ALIGN="justify">Because Geotools core API consists almost exclusively of interfaces (including <A HREF="http://geoapi.sourceforge.net">GeoAPI</A>), factories play a role in how developers use the API. Although the interfaces that are declared in GeoAPI are implemented in various Geotools packages you should not use those classes directly. Instead you should use factories.</P> <P ALIGN="justify">J2SE's <A HREF="http://java.sun.com/j2se/1.4/docs/api/javax/imageio/spi/ServiceRegistry.html" title="class or interface in javax.imageio.spi"><CODE>ServiceRegistry</CODE></A> provides a general way (even if it is defined in a subpackage) to instantiate and manage factories (also called providers). Each factory implementation should be declared in directory, usually bundled in every JAR file. For example if a JAR file provides one or more <CODE>DatumFactory</CODE> implementations, then it must provide the following file:</P> <BLOCKQUOTE><PRE><B>META-INF/services/</B>org.opengis.referencing.datum.DatumFactory</PRE></BLOCKQUOTE> <P ALIGN="justify">with a content similar to the one below:</P> <BLOCKQUOTE><PRE>com.mycompany.MyDatumFactory1com.mycompany.MyDatumFactory2com.mycompany.MyDatumFactory3</PRE></BLOCKQUOTE> <P ALIGN="justify">The ordering is initially unspecified. Users can <A HREF="http://java.sun.com/j2se/1.4/docs/api/javax/imageio/spi/ServiceRegistry.html#setOrdering(java.lang.Class, java.lang.Object, java.lang.Object)" title="class or interface in javax.imageio.spi">set an ordering</A> explicitly themselves, or implementations can do that automatically <A HREF="http://java.sun.com/j2se/1.4/docs/api/javax/imageio/spi/RegisterableService.html#onRegistration(javax.imageio.spi.ServiceRegistry, java.lang.Class)" title="class or interface in javax.imageio.spi">on registration</A>. The <A HREF="../../../org/geotools/factory/AbstractFactory.html" title="class in org.geotools.factory"><CODE>AbstractFactory</CODE></A> class provides a simple way to setup ordering on registration on the basis of a <A HREF="../../../org/geotools/factory/AbstractFactory.html#priority">priority</A> number.</P> <P ALIGN="justify">If a user wants a specific implementation, he can <A HREF="http://java.sun.com/j2se/1.4/docs/api/javax/imageio/spi/ServiceRegistry.html#getServiceProviders(java.lang.Class, boolean)" title="class or interface in javax.imageio.spi">iterates through registered ones</A> and pickup the desired implementation himself. An alternative is to bundle the criterions in a <A HREF="../../../org/geotools/factory/Hints.html" title="class in org.geotools.factory">map of hints</A> and lets the registry selects an implementation accordingly. This later functionality is not provided by the standard <A HREF="http://java.sun.com/j2se/1.4/docs/api/javax/imageio/spi/ServiceRegistry.html" title="class or interface in javax.imageio.spi"><CODE>ServiceRegistry</CODE></A>, but is provided by Geotools's <A HREF="../../../org/geotools/factory/FactoryRegistry.html" title="class in org.geotools.factory"><CODE>FactoryRegistry</CODE></A> extension. This class extends the service registry API with the following functionalities:</P> <UL> <LI><P ALIGN="justify">A <A HREF="../../../org/geotools/factory/FactoryRegistry.html#scanForPlugins()"><CODE>scanForPlugins()</CODE></A> method that scans for plugins in the <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Class.html#getClassLoader()" title="class or interface in java.lang">registry class loader</A>, the <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Thread.html#getContextClassLoader()" title="class or interface in java.lang">thread context class loader</A> and the <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/ClassLoader.html#getSystemClassLoader()" title="class or interface in java.lang">system class loader</A>. Additionally, looks for any implementation specified as <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/System.html#getProperty(java.lang.String)" title="class or interface in java.lang">system property</A>.</P></LI> <LI><P ALIGN="justify">Filters out automatically <A HREF="../../../org/geotools/factory/OptionalFactory.html" title="interface in org.geotools.factory">optional factories</A> when they are not <A HREF="../../../org/geotools/factory/OptionalFactory.html#isAvailable()">available</A>.</P></LI> <LI><P ALIGN="justify">When more than one implementation is available for the same <A HREF="../../../org/geotools/factory/Factory.html" title="interface in org.geotools.factory"><CODE>Factory</CODE></A> subinterface, an optional set of <A HREF="../../../org/geotools/factory/Hints.html" title="class in org.geotools.factory">hints</A> can specifies the criterions that the desired implementation must meets. If a factory implementation depends on other factories, the dependencies hints are checked recursively.</P></LI> <LI><P ALIGN="justify"><U>Optionally</U>, if no factory matches the given hints, a new instance can be <A HREF="../../../org/geotools/factory/FactoryCreator.html#createServiceProvider(java.lang.Class, java.lang.Class, org.geotools.factory.Hints)">automatically created</A>. However, those new instances are not registered. If creation of new instances at every <A HREF="../../../org/geotools/factory/FactoryRegistry.html#getServiceProvider(java.lang.Class, javax.imageio.spi.ServiceRegistry.Filter, org.geotools.factory.Hints, org.geotools.factory.Hints.Key)"><CODE>getServiceProvider(...)</CODE></A> method invocation is undesired, an implementation matching the expected <A HREF="../../../org/geotools/factory/Hints.html" title="class in org.geotools.factory">hints</A> should be registered in the directory, as explained above.</P></LI> </UL> <P ALIGN="justify">Note that the <A HREF="../../../org/geotools/factory/Hints.html" title="class in org.geotools.factory">hints</A>, if provided, don't need to apply directly to the requested factory category. They may apply indirectly through some dependency. A typical example is a request for any <A HREF="http://www.jump-project.org/docs/jts/1.7/api/com/vividsolutions/jts/geom/GeometryFactory.html" title="class or interface in com.vividsolutions.jts.geom"><CODE>GeometryFactory</CODE></A> instance, providing that this instance uses a particular <A HREF="http://www.jump-project.org/docs/jts/1.7/api/com/vividsolutions/jts/geom/CoordinateSequenceFactory.html" title="class or interface in com.vividsolutions.jts.geom"><CODE>CoordinateSequenceFactory</CODE></A> implementation.</P><P><P><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Package</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-use.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../org/geotools/event/package-summary.html"><B>PREV PACKAGE</B></A> <A HREF="../../../org/geotools/feature/package-summary.html"><B>NEXT PACKAGE</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html" target="_top"><B>FRAMES</B></A> <A HREF="package-summary.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR>Copyright © 1996-2007 <a href="http://www.geotools.org">Geotools</a>. All Rights Reserved.</BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -