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

📄 defaultconnectionprovider.html

📁 开源软件openfire的API文件。进行openfire的二次开发所必需的工具。
💻 HTML
📖 第 1 页 / 共 3 页
字号:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets whether connections will be tested after being returned to the pool.</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/jivesoftware/database/DefaultConnectionProvider.html#setTestBeforeUse(java.lang.Boolean)">setTestBeforeUse</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Boolean.html" title="class or interface in java.lang">Boolean</A>&nbsp;testBeforeUse)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets whether connections will be tested before being handed over to be used.</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/jivesoftware/database/DefaultConnectionProvider.html#setTestSQL(java.lang.String)">setTestSQL</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;testSQL)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the SQL statement used to test if a connection is valid.</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/jivesoftware/database/DefaultConnectionProvider.html#setUsername(java.lang.String)">setUsername</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;username)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the username used to connect to the database.</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/jivesoftware/database/DefaultConnectionProvider.html#start()">start</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Starts the connection provider.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/jivesoftware/database/DefaultConnectionProvider.html#toString()">toString</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="DefaultConnectionProvider()"><!-- --></A><H3>DefaultConnectionProvider</H3><PRE>public <B>DefaultConnectionProvider</B>()</PRE><DL><DD>Creates a new DefaultConnectionProvider.<P></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="isPooled()"><!-- --></A><H3>isPooled</H3><PRE>public boolean <B>isPooled</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../org/jivesoftware/database/ConnectionProvider.html#isPooled()">ConnectionProvider</A></CODE></B></DD><DD>Returns true if this connection provider provides connections out of a connection pool. Implementing and using connection providers that are pooled is strongly recommended, as they greatly increase the speed of Jive.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/jivesoftware/database/ConnectionProvider.html#isPooled()">isPooled</A></CODE> in interface <CODE><A HREF="../../../org/jivesoftware/database/ConnectionProvider.html" title="interface in org.jivesoftware.database">ConnectionProvider</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the Connection objects returned by this provider are         pooled.</DL></DD></DL><HR><A NAME="getConnection()"><!-- --></A><H3>getConnection</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/sql/Connection.html" title="class or interface in java.sql">Connection</A> <B>getConnection</B>()                         throws <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/sql/SQLException.html" title="class or interface in java.sql">SQLException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../org/jivesoftware/database/ConnectionProvider.html#getConnection()">ConnectionProvider</A></CODE></B></DD><DD>Returns a database connection. When a Jive component is done with a connection, it will call the close method of that connection. Therefore, connection pools with special release methods are not directly supported by the connection provider infrastructure. Instead, connections from those pools should be wrapped such that calling the close method on the wrapper class will release the connection from the pool.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/jivesoftware/database/ConnectionProvider.html#getConnection()">getConnection</A></CODE> in interface <CODE><A HREF="../../../org/jivesoftware/database/ConnectionProvider.html" title="interface in org.jivesoftware.database">ConnectionProvider</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a Connection object.<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/sql/SQLException.html" title="class or interface in java.sql">SQLException</A></CODE> - is an SQL error occured while retrieving the connection.</DL></DD></DL><HR><A NAME="start()"><!-- --></A><H3>start</H3><PRE>public void <B>start</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../org/jivesoftware/database/ConnectionProvider.html#start()">ConnectionProvider</A></CODE></B></DD><DD>Starts the connection provider. For some connection providers, this will be a no-op. However, connection provider users should always call this method to make sure the connection provider is started.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/jivesoftware/database/ConnectionProvider.html#start()">start</A></CODE> in interface <CODE><A HREF="../../../org/jivesoftware/database/ConnectionProvider.html" title="interface in org.jivesoftware.database">ConnectionProvider</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="restart()"><!-- --></A><H3>restart</H3><PRE>public void <B>restart</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../org/jivesoftware/database/ConnectionProvider.html#restart()">ConnectionProvider</A></CODE></B></DD><DD>This method should be called whenever properties have been changed so that the changes will take effect.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/jivesoftware/database/ConnectionProvider.html#restart()">restart</A></CODE> in interface <CODE><A HREF="../../../org/jivesoftware/database/ConnectionProvider.html" title="interface in org.jivesoftware.database">ConnectionProvider</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="destroy()"><!-- --></A><H3>destroy</H3><PRE>public void <B>destroy</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../org/jivesoftware/database/ConnectionProvider.html#destroy()">ConnectionProvider</A></CODE></B></DD><DD>Tells the connection provider to destroy itself. For many connection providers, this will essentially result in a no-op. However, connection provider users should always call this method when changing from one connection provider to another to ensure that there are no dangling database connections.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/jivesoftware/database/ConnectionProvider.html#destroy()">destroy</A></CODE> in interface <CODE><A HREF="../../../org/jivesoftware/database/ConnectionProvider.html" title="interface in org.jivesoftware.database">ConnectionProvider</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getDriver()"><!-- --></A><H3>getDriver</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getDriver</B>()</PRE><DL><DD>Returns the JDBC driver classname used to make database connections. For example: com.mysql.jdbc.Driver<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the JDBC driver classname.</DL></DD></DL><HR><A NAME="setDriver(java.lang.String)"><!-- --></A><H3>setDriver</H3><PRE>public void <B>setDriver</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;driver)</PRE><DL><DD>Sets the JDBC driver classname used to make database connections. For example: com.mysql.jdbc.Driver<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>driver</CODE> - the fully qualified JDBC driver name.</DL></DD></DL><HR><A NAME="getServerURL()"><!-- --></A><H3>getServerURL</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getServerURL</B>()</PRE><DL><DD>Returns the JDBC connection URL used to make database connections.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the JDBC connection URL.</DL></DD></DL><HR><A NAME="setServerURL(java.lang.String)"><!-- --></A><H3>setServerURL</H3><PRE>public void <B>setServerURL</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;serverURL)</PRE><DL><DD>Sets the JDBC connection URL used to make database connections.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>serverURL</CODE> - the JDBC connection URL.</DL></DD></DL><HR><A NAME="getUsername()"><!-- --></A><H3>getUsername</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getUsername</B>()</PRE><DL><DD>Returns the username used to connect to the database. In some cases, a username is not needed so this method will return null.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the username used to connect to the datbase.</DL></DD></DL><HR><A NAME="setUsername(java.lang.String)"><!-- --></A><H3>setUsername</H3><PRE>public void <B>setUsername</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;username)</PRE><DL><DD>Sets the username used to connect to the database. In some cases, a username is not needed so null should be passed in.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>username</CODE> - the username used to connect to the database.</DL></DD></DL><HR><A NAME="getPassword()"><!-- --></A><H3>getPassword</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getPassword</B>()</PRE><DL><DD>Returns the password used to connect to the database. In some cases, a password is not needed so this method will return null.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the password used to connect to the database.</DL></DD></DL><HR><A NAME="setPassword(java.lang.String)"><!-- --></A><H3>setPassword</H3><PRE>public void <B>setPassword</B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;password)</PRE><DL>

⌨️ 快捷键说明

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