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

📄 service.html

📁 j2ee api,很好的api。我这现在有
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<A NAME="isConnected()"><!-- --></A><H3>isConnected</H3><PRE>public boolean <B>isConnected</B>()</PRE><DL><DD>Is this service currently connected? <p> This implementation uses a private boolean field to  store the connection state. This method returns the value of that field. <p> Subclasses may want to override this method to verify that any connection to the message store is still alive.<P><DD><DL><DT><B>Returns:</B><DD>true if the service is connected, false if it is not connected</DL></DD></DL><HR><A NAME="setConnected(boolean)"><!-- --></A><H3>setConnected</H3><PRE>protected void <B>setConnected</B>(boolean&nbsp;connected)</PRE><DL><DD>Set the connection state of this service.  The connection state will automatically be set by the service implementation during the <code>connect</code> and <code>close</code> methods. Subclasses will need to call this method to set the state if the service was automatically disconnected. <p> The implementation in this class merely sets the private field returned by the <code>isConnected</code> method.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>connected</CODE> - true if the service is connected,                  false if it is not connected</DL></DD></DL><HR><A NAME="close()"><!-- --></A><H3>close</H3><PRE>public void <B>close</B>()           throws <A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></PRE><DL><DD>Close this service and terminate its connection. A close ConnectionEvent is delivered to any ConnectionListeners. Any Messaging components (Folders, Messages, etc.) belonging to this service are invalid after this service is closed. Note that the service is closed even if this method terminates abnormally by throwing a MessagingException. <p> This implementation uses <code>setConnected(false)</code> to set this service's connected state to <code>false</code>. It will then send a close ConnectionEvent to any registered ConnectionListeners. Subclasses overriding this method to do implementation specific cleanup should call this method as a last step to insure event notification, probably by including a call to <code>super.close()</code> in a <code>finally</code> clause.<P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException</A></CODE> - for errors while closing<DT><B>See Also:</B><DD><A HREF="../../javax/mail/event/ConnectionEvent.html" title="class in javax.mail.event"><CODE>ConnectionEvent</CODE></A></DL></DD></DL><HR><A NAME="getURLName()"><!-- --></A><H3>getURLName</H3><PRE>public <A HREF="../../javax/mail/URLName.html" title="class in javax.mail">URLName</A> <B>getURLName</B>()</PRE><DL><DD>Return a URLName representing this service.  The returned URLName does <em>not</em> include the password field.  <p> Subclasses should only override this method if their URLName does not follow the standard format. <p> The implementation in the Service class returns (usually a copy of) the <code>url</code> field with the password and file information stripped out.<P><DD><DL><DT><B>Returns:</B><DD>the URLName representing this service<DT><B>See Also:</B><DD><A HREF="../../javax/mail/URLName.html" title="class in javax.mail"><CODE>URLName</CODE></A></DL></DD></DL><HR><A NAME="setURLName(javax.mail.URLName)"><!-- --></A><H3>setURLName</H3><PRE>protected void <B>setURLName</B>(<A HREF="../../javax/mail/URLName.html" title="class in javax.mail">URLName</A>&nbsp;url)</PRE><DL><DD>Set the URLName representing this service. Normally used to update the <code>url</code> field after a service has successfully connected. <p> Subclasses should only override this method if their URL does not follow the standard format.  In particular, subclasses should override this method if their URL does not require all the possible fields supported by <code>URLName</code>; a new <code>URLName</code> should be constructed with any unneeded fields removed. <p> The implementation in the Service class simply sets the <code>url</code> field.<P><DD><DL><DT><B>See Also:</B><DD><A HREF="../../javax/mail/URLName.html" title="class in javax.mail"><CODE>URLName</CODE></A></DL></DD></DL><HR><A NAME="addConnectionListener(javax.mail.event.ConnectionListener)"><!-- --></A><H3>addConnectionListener</H3><PRE>public void <B>addConnectionListener</B>(<A HREF="../../javax/mail/event/ConnectionListener.html" title="interface in javax.mail.event">ConnectionListener</A>&nbsp;l)</PRE><DL><DD>Add a listener for Connection events on this service. <p> The default implementation provided here adds this listener to an internal list of ConnectionListeners.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>l</CODE> - the Listener for Connection events<DT><B>See Also:</B><DD><A HREF="../../javax/mail/event/ConnectionEvent.html" title="class in javax.mail.event"><CODE>ConnectionEvent</CODE></A></DL></DD></DL><HR><A NAME="removeConnectionListener(javax.mail.event.ConnectionListener)"><!-- --></A><H3>removeConnectionListener</H3><PRE>public void <B>removeConnectionListener</B>(<A HREF="../../javax/mail/event/ConnectionListener.html" title="interface in javax.mail.event">ConnectionListener</A>&nbsp;l)</PRE><DL><DD>Remove a Connection event listener. <p> The default implementation provided here removes this listener from the internal list of ConnectionListeners.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>l</CODE> - the listener<DT><B>See Also:</B><DD><A HREF="../../javax/mail/Service.html#addConnectionListener(javax.mail.event.ConnectionListener)"><CODE>addConnectionListener(javax.mail.event.ConnectionListener)</CODE></A></DL></DD></DL><HR><A NAME="notifyConnectionListeners(int)"><!-- --></A><H3>notifyConnectionListeners</H3><PRE>protected void <B>notifyConnectionListeners</B>(int&nbsp;type)</PRE><DL><DD>Notify all ConnectionListeners. Service implementations are expected to use this method to broadcast connection events. <p> The provided default implementation queues the event into an internal event queue. An event dispatcher thread dequeues events from the queue and dispatches them to the registered ConnectionListeners. Note that the event dispatching occurs in a separate thread, thus avoiding potential deadlock problems.<P><DD><DL></DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>toString</B>()</PRE><DL><DD>Return <code>getURLName.toString()</code> if this service has a URLName, otherwise it will return the default <code>toString</code>.<P><DD><DL></DL></DD></DL><HR><A NAME="queueEvent(javax.mail.event.MailEvent, java.util.Vector)"><!-- --></A><H3>queueEvent</H3><PRE>protected void <B>queueEvent</B>(<A HREF="../../javax/mail/event/MailEvent.html" title="class in javax.mail.event">MailEvent</A>&nbsp;event,                          <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Vector.html" title="class or interface in java.util">Vector</A>&nbsp;vector)</PRE><DL><DD>Add the event and vector of listeners to the queue to be delivered.<P><DD><DL></DL></DD></DL><HR><A NAME="finalize()"><!-- --></A><H3>finalize</H3><PRE>protected void <B>finalize</B>()                 throws <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Throwable.html" title="class or interface in java.lang">Throwable</A></PRE><DL><DD>Stop the event dispatcher thread so the queue can be garbage collected.<P><DD><DL><DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Throwable.html" title="class or interface in java.lang">Throwable</A></CODE></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><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>&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="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><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Ent. Ed. v1.4</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../javax/mail/Provider.Type.html" title="class in javax.mail"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../javax/mail/Session.html" title="class in javax.mail"><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="Service.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&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><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><font size="-1"><a href="http://java.sun.com/webapps/bugreport">Submit a bug or feature</a> <p>Copyright 2003 Sun Microsystems, Inc. All rights reserved.</font></BODY></HTML>

⌨️ 快捷键说明

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