⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 factory.html

📁 turbine教程
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Fri Dec 06 19:57:08 CET 2002 --><TITLE>jakarta-turbine-2 2.2 API: Interface  Factory</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Factory.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;PREV CLASS&nbsp;&nbsp;<A HREF="../../../../../org/apache/turbine/services/factory/FactoryService.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="Factory.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.apache.turbine.services.factory</FONT><BR>Interface  Factory</H2><HR><DL><DT>public interface <B>Factory</B></DL><P>Factory is an interface for object factories. Object factories can be registered to the Factory Service to support customized functionality during instantiation of specific classes that  the service itself cannot provide. Examples include instantiation of XML parsers and secure sockets requiring provider specific initializations before instantiation.<P><DL><DT><B>Version: </B><DD>$Id: Factory.java,v 1.1.1.1 2001/08/16 05:08:52 jvanzyl Exp $</DD><DT><B>Author: </B><DD><a href="mailto:ilkka.priha@simsoft.fi">Ilkka Priha</a></DD></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/factory/Factory.html#getInstance()">getInstance</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets an instance of a class.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/factory/Factory.html#getInstance(java.lang.ClassLoader)">getInstance</A></B>(java.lang.ClassLoader&nbsp;loader)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets an instance of a class using a specified class loader.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/factory/Factory.html#getInstance(java.lang.ClassLoader, java.lang.Object[], java.lang.String[])">getInstance</A></B>(java.lang.ClassLoader&nbsp;loader,            java.lang.Object[]&nbsp;params,            java.lang.String[]&nbsp;signature)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets an instance of a named class using a specified class loader.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.Object</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/factory/Factory.html#getInstance(java.lang.Object[], java.lang.String[])">getInstance</A></B>(java.lang.Object[]&nbsp;params,            java.lang.String[]&nbsp;signature)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets an instance of a named class.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/factory/Factory.html#init(java.lang.String)">init</A></B>(java.lang.String&nbsp;className)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initializes the factory.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/turbine/services/factory/Factory.html#isLoaderSupported()">isLoaderSupported</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tests if this object factory supports specified class loaders.</TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="init(java.lang.String)"><!-- --></A><H3>init</H3><PRE>public void <B>init</B>(java.lang.String&nbsp;className)          throws <A HREF="../../../../../org/apache/turbine/util/TurbineException.html">TurbineException</A></PRE><DL><DD>Initializes the factory. This method is called by the Factory Service before the factory is taken into use.<DD><DL><DT><B>Parameters:</B><DD><CODE>className</CODE> - the name of the production class<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/turbine/util/TurbineException.html">TurbineException</A></CODE> - if initialization fails.</DL></DD></DL><HR><A NAME="getInstance()"><!-- --></A><H3>getInstance</H3><PRE>public java.lang.Object <B>getInstance</B>()                             throws <A HREF="../../../../../org/apache/turbine/util/TurbineException.html">TurbineException</A></PRE><DL><DD>Gets an instance of a class.<DD><DL><DT><B>Returns:</B><DD>the instance.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/turbine/util/TurbineException.html">TurbineException</A></CODE> - if instantiation fails.</DL></DD></DL><HR><A NAME="getInstance(java.lang.ClassLoader)"><!-- --></A><H3>getInstance</H3><PRE>public java.lang.Object <B>getInstance</B>(java.lang.ClassLoader&nbsp;loader)                             throws <A HREF="../../../../../org/apache/turbine/util/TurbineException.html">TurbineException</A></PRE><DL><DD>Gets an instance of a class using a specified class loader.  <p>Class loaders are supported only if the isLoaderSupported method returns true. Otherwise the loader parameter is ignored.<DD><DL><DT><B>Parameters:</B><DD><CODE>loader</CODE> - the class loader.<DT><B>Returns:</B><DD>the instance.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/turbine/util/TurbineException.html">TurbineException</A></CODE> - if instantiation fails.</DL></DD></DL><HR><A NAME="getInstance(java.lang.Object[], java.lang.String[])"><!-- --></A><H3>getInstance</H3><PRE>public java.lang.Object <B>getInstance</B>(java.lang.Object[]&nbsp;params,                                    java.lang.String[]&nbsp;signature)                             throws <A HREF="../../../../../org/apache/turbine/util/TurbineException.html">TurbineException</A></PRE><DL><DD>Gets an instance of a named class. Parameters for its constructor are given as an array of objects, primitive types must be wrapped with a corresponding class.<DD><DL><DT><B>Parameters:</B><DD><CODE>params</CODE> - an array containing the parameters of the constructor.<DD><CODE>signature</CODE> - an array containing the signature of the constructor.<DT><B>Returns:</B><DD>the instance.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/turbine/util/TurbineException.html">TurbineException</A></CODE> - if instantiation fails.</DL></DD></DL><HR><A NAME="getInstance(java.lang.ClassLoader, java.lang.Object[], java.lang.String[])"><!-- --></A><H3>getInstance</H3><PRE>public java.lang.Object <B>getInstance</B>(java.lang.ClassLoader&nbsp;loader,                                    java.lang.Object[]&nbsp;params,                                    java.lang.String[]&nbsp;signature)                             throws <A HREF="../../../../../org/apache/turbine/util/TurbineException.html">TurbineException</A></PRE><DL><DD>Gets an instance of a named class using a specified class loader. Parameters for its constructor are given as an array of objects, primitive types must be wrapped with a corresponding class.  <p>Class loaders are supported only if the isLoaderSupported method returns true. Otherwise the loader parameter is ignored.<DD><DL><DT><B>Parameters:</B><DD><CODE>loader</CODE> - the class loader.<DD><CODE>params</CODE> - an array containing the parameters of the constructor.<DD><CODE>signature</CODE> - an array containing the signature of the constructor.<DT><B>Returns:</B><DD>the instance.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../../org/apache/turbine/util/TurbineException.html">TurbineException</A></CODE> - if instantiation fails.</DL></DD></DL><HR><A NAME="isLoaderSupported()"><!-- --></A><H3>isLoaderSupported</H3><PRE>public boolean <B>isLoaderSupported</B>()</PRE><DL><DD>Tests if this object factory supports specified class loaders.<DD><DL><DT><B>Returns:</B><DD>true if class loaders are supported, false otherwise.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/Factory.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;PREV CLASS&nbsp;&nbsp;<A HREF="../../../../../org/apache/turbine/services/factory/FactoryService.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="Factory.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR>Copyright &copy; 2000-2002 Apache Software Foundation. All Rights Reserved.</BODY></HTML>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -