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

📄 turbineservices.html

📁 turbine教程
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="TurbineServices()"><!-- --></A><H3>TurbineServices</H3><PRE>protected <B>TurbineServices</B>()</PRE><DL><DD>This constructor is protected to force clients to use getInstance() to access this class.</DL><!-- ============ 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="getInstance()"><!-- --></A><H3>getInstance</H3><PRE>public static <A HREF="../../../../org/apache/turbine/services/ServiceBroker.html">ServiceBroker</A> <B>getInstance</B>()</PRE><DL><DD>The method through which this class is accessed.<DD><DL><DT><B>Returns:</B><DD>The single instance of this class.</DL></DD></DL><HR><A NAME="initPrimaryServices(javax.servlet.ServletConfig)"><!-- --></A><H3>initPrimaryServices</H3><PRE>public void <B>initPrimaryServices</B>(javax.servlet.ServletConfig&nbsp;config)                         throws <A HREF="../../../../org/apache/turbine/services/InstantiationException.html">InstantiationException</A>,                                <A HREF="../../../../org/apache/turbine/services/InitializationException.html">InitializationException</A></PRE><DL><DD>Initialize the primary services (Logging and Resources).</DL><HR><A NAME="initMapping(org.apache.commons.configuration.Configuration)"><!-- --></A><H3>initMapping</H3><PRE>public void <B>initMapping</B>(org.apache.commons.configuration.Configuration&nbsp;mapping)</PRE><DL><DD>Creates mapping of Service names to class names. BaseServiceBroker knows no mappings.</DL><HR><A NAME="initMapping()"><!-- --></A><H3>initMapping</H3><PRE>protected void <B>initMapping</B>()</PRE><DL><DD>Creates a mapping between Service names and class names. The mapping is built according to settings present in TurbineResources.properties.  The entries should have the following form: <pre> services.MyService.classname=com.mycompany.MyServiceImpl services.MyOtherService.classname=com.mycompany.MyOtherServiceImpl </pre> <br> Generic ServiceBroker provides no Services.</DL><HR><A NAME="getProperties(java.lang.String)"><!-- --></A><H3>getProperties</H3><PRE>public java.util.Properties <B>getProperties</B>(java.lang.String&nbsp;name)</PRE><DL><DD>Returns the properites of a specific service.  Properties are retrieved from TurbineResources.properties provided that you have the following entries: <br> services.MyService.greeting=Hello\, I'm Jan B. <br> services.MyService.defaultAction=beep <br> Service "MyService" will get a set of two properites: "greeting" = "Hello, I'm Jan B." and "defaultAction" = "beep". <p> Note that this way you will receive a 'collapsed' version of your resources - multiple entries with the same key will have only one value stored.  Use the <A HREF="../../../../org/apache/turbine/services/TurbineServices.html#getConfiguration(java.lang.String)"><CODE>getConfiguration(java.lang.String)</CODE></A> or <A HREF="../../../../org/apache/turbine/services/TurbineServices.html#getResources(java.lang.String)"><CODE>getResources(java.lang.String)</CODE></A> method to take advantage of the capabilities of the <A HREF="../../../../org/apache/turbine/services/resources/TurbineResources.html"><CODE>TurbineResources</CODE></A> class.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/apache/turbine/services/BaseServiceBroker.html#getProperties(java.lang.String)">getProperties</A></CODE> in class <CODE><A HREF="../../../../org/apache/turbine/services/BaseServiceBroker.html">BaseServiceBroker</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the service.<DT><B>Returns:</B><DD>Properties of requested Service.</DL></DD></DL><HR><A NAME="getConfiguration(java.lang.String)"><!-- --></A><H3>getConfiguration</H3><PRE>public org.apache.commons.configuration.Configuration <B>getConfiguration</B>(java.lang.String&nbsp;name)</PRE><DL><DD>Returns the Configuration for the specified service.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/apache/turbine/services/BaseServiceBroker.html#getConfiguration(java.lang.String)">getConfiguration</A></CODE> in class <CODE><A HREF="../../../../org/apache/turbine/services/BaseServiceBroker.html">BaseServiceBroker</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the service.</DL></DD></DL><HR><A NAME="getResources(java.lang.String)"><!-- --></A><H3>getResources</H3><PRE>public <A HREF="../../../../org/apache/turbine/services/resources/ResourceService.html">ResourceService</A> <B>getResources</B>(java.lang.String&nbsp;name)</PRE><DL><DD>Returns the configuration resources of a specific service. This method extracts the configuration options of a service from global Turbine configuration. The interface <A HREF="../../../../org/apache/turbine/services/resources/ResourceService.html"><CODE>ResourceService</CODE></A> offers significant advantages over plain java.util.Properties - you can request for exaple you can retrieve <code>int</code>s <code>boolean</code>s, and vectors of <code>String</code>s. <p> Note that the proces extracting the configuration might be time consuming, it might be a good idea to store the reference returned by this method in an instance variable of the service.</p><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the Service.<DT><B>Returns:</B><DD>The configuration resources of the Service.</DL></DD></DL><HR><A NAME="notice(java.lang.String)"><!-- --></A><H3>notice</H3><PRE>public void <B>notice</B>(java.lang.String&nbsp;msg)</PRE><DL><DD>Output a diagnostic notice. This method is used by the service framework classes for producing tracing mesages that might be useful for debugging. <p>Standard Turbine logging facilities are used.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/apache/turbine/services/BaseInitableBroker.html#notice(java.lang.String)">notice</A></CODE> in class <CODE><A HREF="../../../../org/apache/turbine/services/BaseInitableBroker.html">BaseInitableBroker</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>msg</CODE> - the message to print.</DL></DD></DL><HR><A NAME="error(java.lang.Throwable)"><!-- --></A><H3>error</H3><PRE>public void <B>error</B>(java.lang.Throwable&nbsp;t)</PRE><DL><DD>Output an error message. This method is used by the service framework classes for displaying stacktraces of any exceptions that might be caught during processing. <p>Standard Turbine logging facilities are used.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/apache/turbine/services/BaseInitableBroker.html#error(java.lang.Throwable)">error</A></CODE> in class <CODE><A HREF="../../../../org/apache/turbine/services/BaseInitableBroker.html">BaseInitableBroker</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>msg</CODE> - the message to print.</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/TurbineServices.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;<A HREF="../../../../org/apache/turbine/services/TurbineBaseService.html"><B>PREV CLASS</B></A>&nbsp;&nbsp;NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="TurbineServices.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;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: &nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&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 + -