|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /usr/share/javadoc/javamail/javax/mail/ |
Upload File : |
<?xml version="1.0" encoding="US-ASCII"?>
<!DOCTYPE html PUBLIC "-//gnu.org///DTD XHTML 1.1 plus Target 1.0//EN" "../../resources/xhtml11-target10.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head><title>Service (GNU JavaMail API documentation)</title><script src="../../resources/gjdoc.js" type="text/javascript"><!-- this comment required for konqueror 3.2.2 --></script><meta http-equiv="Content-Type" content="text/html; charset=US-ASCII"/><meta name="generator" content="GNU Gjdoc Standard Doclet"/><meta name="keywords" content="javax.mail.Service class"/><meta name="keywords" content="session"/><meta name="keywords" content="url"/><meta name="keywords" content="debug"/><meta name="keywords" content="connect()"/><meta name="keywords" content="protocolConnect()"/><meta name="keywords" content="isConnected()"/><meta name="keywords" content="setConnected()"/><meta name="keywords" content="close()"/><meta name="keywords" content="getURLName()"/><meta name="keywords" content="setURLName()"/><meta name="keywords" content="addConnectionListener()"/><meta name="keywords" content="removeConnectionListener()"/><meta name="keywords" content="notifyConnectionListeners()"/><meta name="keywords" content="toString()"/><link rel="stylesheet" type="text/css" href="../../resources/gjdochtml-clean-layout.css" title="GNU Clean"/><link rel="stylesheet" type="text/css" href="../../resources/gjdochtml-clean-color1.css" title="GNU Clean"/></head><body class="content class" onload="if(parent.contentPageLoaded)parent.contentPageLoaded(document.title)"><table class="navbar div top"><tr><td class="navbar div top"><div class="navbar div top"><span class="navbar item enabled"><a href="../../overview-summary.html">Overview</a></span> <span class="navbar item enabled"><a href="package-summary.html">Package</a></span> <span class="navbar item active">Class</span> <span class="navbar item enabled"><a href="Service-uses.html">Use</a></span> <span class="navbar item enabled"><a href="tree.html">Tree</a></span> <span class="navbar item enabled"><a href="../../alphaindex.html">Index</a></span> <span class="navbar item enabled"><a href="../../deprecated.html">Deprecated</a></span> <span class="navbar item enabled"><a href="../../about.html">About</a></span></div></td></tr><tr><td class="navi"><a href="../../javax/mail/SendFailedException.html">Prev Class</a> | <a href="../../javax/mail/Session.html">Next Class</a></td><td class="navi"><a href="../../index.html" title="Show in a frameset" target="_top">Frames</a> | <a href="Service.html" title="Show without frames" target="_top">No Frames</a> </td></tr><tr><td class="navi">Summary: Nested | <a href="#summary-fields">Field</a> | <a href="#summary-methods">Method</a> | <a href="#summary-constructors">Constr</a></td><td class="navi">Detail: Nested | <a href="#detail-fields">Field</a> | <a href="#detail-methods">Method</a> | <a href="#detail-constructors">Constr</a></td></tr></table><div class="class title outer"><h3 class="class title-package">javax.mail</h3><h1 class="class title-class">Class Service</h1></div><div class="class inheritance-tree"><ul class="inheritance 0"><li class="inheritance 0"><code><a href="file:/usr/share/javadoc/java/java/lang/Object.html">java.lang.Object</a></code></li><li><ul class="inheritance 1"><li class="inheritance 1"><code>javax.mail.Service</code></li><li></li></ul></li></ul></div><dl class="class subclasses"><dt class="class subclasses header"><b>Known Direct Subclasses:</b></dt><dd class="class subclasses header"><a href="../../javax/mail/Store.html" title="Class in javax.mail">Store</a>, <a href="../../javax/mail/Transport.html" title="Class in javax.mail">Transport</a></dd></b></dt></dl><hr/><div class="class synopsis outer"><div class="class synopsis declaration"><code>public abstract class <b class="class synopsis name">Service</b></code></div><div class="class synopsis superclass"><code>extends <a href="file:/usr/share/javadoc/java/java/lang/Object.html" title="Class in ">Object</a></code></div></div><hr/><div class="class description"> An abstract class that contains the functionality common to messaging
services, such as stores and transports.
<p/>
A messaging service is created from a Session and is named using a URLName.
A service must be connected before it can be used.
Connection events are sent to reflect its connection status.
</div><div class="taglet"><dl class="tag list"></dl><dt class="tag section header"><b>Version:</b></dt><dd>1.3</dd></dl></div><div class="taglet"><dl class="tag list"><dt class="tag section header"><b>Author:</b></dt><dd class="tag item"><a href="mailto:dog@gnu.org">Chris Burdess</a></dd></dl></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><a name="summary-fields" id="summary-fields"/><dl class="table container"><dd><table class="class summary" border="1" width="100%"><tr class="table header"><td colspan="2"><h2 class="table header">Field Summary</h2></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected boolean</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#debug">debug</a></code></dt><dd class="description"> Debug flag for this service.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected <a href="../../javax/mail/Session.html" title="Class in javax.mail">Session</a></code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#session">session</a></code></dt><dd class="description"> The session from which this service was created.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected <a href="../../javax/mail/URLName.html" title="Class in javax.mail">URLName</a></code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#url">url</a></code></dt><dd class="description"> The URLName of this service.</dd></dl></td></tr></table></dd></dl><a name="summary-constructors" id="summary-constructors"/><dl class="table container"><dd><table class="class summary" border="1" width="100%"><tr class="table header"><td colspan="2"><h2 class="table header">Constructor Summary</h2></td></tr><tr><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#Service(javax.mail.Session,javax.mail.URLName)">Service</a>(<a href="../../javax/mail/Session.html" title="Class in javax.mail">Session</a> session, <a href="../../javax/mail/URLName.html" title="Class in javax.mail">URLName</a> url)</code></dt><dd class="description"> Constructor.</dd></dl></td></tr></table></dd></dl><a name="summary-methods" id="summary-methods"/><dl class="table container"><dd><table class="class summary" border="1" width="100%"><tr class="table header"><td colspan="2"><h2 class="table header">Method Summary</h2></td></tr><tr><td class="left" valign="top"><code class="synopsis"> void</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#addConnectionListener(javax.mail.event.ConnectionListener)">addConnectionListener</a>(<a href="../../javax/mail/event/ConnectionListener.html" title="Interface in javax.mail.event">ConnectionListener</a> l)</code></dt><dd class="description"> Add a listener for Connection events on this service.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis"> void</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#close()">close</a>()</code></dt><dd class="description"> Close this service and terminate its connection.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis"> void</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#connect()">connect</a>()</code></dt><dd class="description"> A generic connect method that takes no parameters.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis"> void</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#connect(String,String,String)">connect</a>(String host, String user, String password)</code></dt><dd class="description"> Connect to the specified address.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis"> void</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#connect(String,int,String,String)">connect</a>(String host, int port, String user, String password)</code></dt><dd class="description"> Similar to connect(host, user, password) except a specific port can be
specified.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis"> <a href="../../javax/mail/URLName.html" title="Class in javax.mail">URLName</a></code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#getURLName()">getURLName</a>()</code></dt><dd class="description"> Return a URLName representing this service.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis"> boolean</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#isConnected()">isConnected</a>()</code></dt><dd class="description"> Is this service currently connected?
<p/>
This implementation uses a private boolean field to store the connection
state.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected void</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#notifyConnectionListeners(int)">notifyConnectionListeners</a>(int type)</code></dt><dd class="description"> Notify all ConnectionListeners.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected boolean</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#protocolConnect(String,int,String,String)">protocolConnect</a>(String host, int port, String user, String password)</code></dt><dd class="description"> The service implementation should override this method to perform the
actual protocol-specific connection attempt.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis"> void</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#removeConnectionListener(javax.mail.event.ConnectionListener)">removeConnectionListener</a>(<a href="../../javax/mail/event/ConnectionListener.html" title="Interface in javax.mail.event">ConnectionListener</a> l)</code></dt><dd class="description"> Remove a Connection event listener.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected void</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#setConnected(boolean)">setConnected</a>(boolean connected)</code></dt><dd class="description"> Set the connection state of this service.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis">protected void</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#setURLName(javax.mail.URLName)">setURLName</a>(<a href="../../javax/mail/URLName.html" title="Class in javax.mail">URLName</a> url)</code></dt><dd class="description"> Set the URLName representing this service.</dd></dl></td></tr><tr><td class="left" valign="top"><code class="synopsis"> String</code></td><td class="right"><dl class="list"><dt class="synopsis"><code><a href="#toString()">toString</a>()</code></dt><dd class="description"> Return getURLName.toString() if this service has a URLName,
otherwise it will return the default toString.</dd></dl></td></tr></table></dd></dl><a name="detail-fields" id="detail-fields"/><h2 class="section header">Field Details</h2><div class="section"><a name="debug" id="debug"/><div class="member detail outer"><h3 class="member detail name">debug</h3><pre class="member detail synopsis">protected boolean debug</pre><blockquote class="member detail name"><div class="member detail description"> Debug flag for this service.
Set from the session's debug flag when this service is created.
</div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="session" id="session"/><div class="member detail outer"><h3 class="member detail name">session</h3><pre class="member detail synopsis">protected <a href="../../javax/mail/Session.html" title="Class in javax.mail">Session</a> session</pre><blockquote class="member detail name"><div class="member detail description"> The session from which this service was created.
</div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="url" id="url"/><div class="member detail outer"><h3 class="member detail name">url</h3><pre class="member detail synopsis">protected <a href="../../javax/mail/URLName.html" title="Class in javax.mail">URLName</a> url</pre><blockquote class="member detail name"><div class="member detail description"> The URLName of this service.
</div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div></div><a name="detail-constructors" id="detail-constructors"/><h2 class="section header">Constructor Details</h2><div class="section"><a name="Service(javax.mail.Session,javax.mail.URLName)" id="Service(javax.mail.Session,javax.mail.URLName)"/><div class="member detail outer"><h3 class="member detail name">Service</h3><pre class="member detail synopsis">protected Service(<a href="../../javax/mail/Session.html" title="Class in javax.mail">Session</a> session,
<a href="../../javax/mail/URLName.html" title="Class in javax.mail">URLName</a> url)</pre><blockquote class="member detail name"><div class="member detail description"> Constructor.
</div><div class="parameter"><dl><dt class="header"><b>Parameters:</b></dt><dd class="item"><code class="name">session</code><span class="separator"> - </span><span class="description">Session object for this service</span></dd><dd class="item"><code class="name">url</code><span class="separator"> - </span><span class="description">URLName object to be used for this service</span></dd></dl></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div></div><a name="detail-methods" id="detail-methods"/><h2 class="section header">Method Details</h2><div class="section"><a name="addConnectionListener(javax.mail.event.ConnectionListener)" id="addConnectionListener(javax.mail.event.ConnectionListener)"/><div class="member detail outer"><h3 class="member detail name">addConnectionListener</h3><pre class="member detail synopsis">public void addConnectionListener(<a href="../../javax/mail/event/ConnectionListener.html" title="Interface in javax.mail.event">ConnectionListener</a> l)</pre><blockquote class="member detail name"><div class="member detail description"> Add a listener for Connection events on this service.
</div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="close()" id="close()"/><div class="member detail outer"><h3 class="member detail name">close</h3><pre class="member detail synopsis">public void close()
throws <a href="../../javax/mail/MessagingException.html" title="Class in javax.mail">MessagingException</a></pre><blockquote class="member detail name"><div class="member detail description"> 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 false. 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 finally clause.
</div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="connect()" id="connect()"/><div class="member detail outer"><h3 class="member detail name">connect</h3><pre class="member detail synopsis">public void connect()
throws <a href="../../javax/mail/MessagingException.html" title="Class in javax.mail">MessagingException</a></pre><blockquote class="member detail name"><div class="member detail description"> A generic connect method that takes no parameters.
Subclasses can implement the appropriate authentication schemes.
Subclasses that need additional information might want to use
some properties or might get it interactively using a popup window.
<p/>
If the connection is successful, an "open" ConnectionEvent is delivered
to any ConnectionListeners on this service.
<p/>
Most clients should just call this method to connect to the service.
<p/>
It is an error to connect to an already connected service.
<p/>
The implementation provided here simply calls the following
<code>connect(String, String, String)</code> method with nulls.
</div><div class="member detail thrown list"><dl><dt class="member detail thrown header"><b>Throws:</b></dt><dd class="member detail thrown item"><code class="name"><a href="../../javax/mail/MessagingException.html" title="Class in javax.mail">MessagingException</a></code><span class="separator"> - </span><span class="description">for other failures</span></dd></dl></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="connect(String,String,String)" id="connect(String,String,String)"/><div class="member detail outer"><h3 class="member detail name">connect</h3><pre class="member detail synopsis">public void connect(String host,
String user,
String password)
throws <a href="../../javax/mail/MessagingException.html" title="Class in javax.mail">MessagingException</a></pre><blockquote class="member detail name"><div class="member detail description"> Connect to the specified address.
This method provides a simple authentication scheme
that requires a username and password.
<p/>
If the connection is successful, an "open" ConnectionEvent is delivered
to any ConnectionListeners on this service.
<p/>
It is an error to connect to an already connected service.
<p/>
The implementation in the Service class will collect defaults for the
host, user, and password from the session, from the URLName for this
service, and from the supplied parameters and then call the
<code>protocolConnect</code> method. If the <code>protocolConnect</code>
method returns false, the user will be prompted for any missing
information and the <code>protocolConnect</code> method will be called
again. The subclass should override the <code>protocolConnect</code>
method. The subclass should also implement the <code>getURLName</code>
method, or use the implementation in this class.
<p/>
On a successful connection, the <code>setURLName</code> method is called
with a URLName that includes the information used to make the connection,
including the password.
<p/>
If the password passed in is null and this is the first successful
connection to this service, the user name and the password collected from
the user will be saved as defaults for subsequent connection attempts to
this same service when using other Service object instances (the
connection information is typically always saved within a particular
Service object instance). The password is saved using the Session method
<code>setPasswordAuthenticaiton</code>. If the password passed in is not
null, it is not saved, on the assumption that the application is managing
passwords explicitly.
</div><div class="parameter"><dl><dt class="header"><b>Parameters:</b></dt><dd class="item"><code class="name">host</code><span class="separator"> - </span><span class="description">the host to connect to</span></dd><dd class="item"><code class="name">user</code><span class="separator"> - </span><span class="description">the user name</span></dd><dd class="item"><code class="name">password</code><span class="separator"> - </span><span class="description">this user's password</span></dd></dl></div><div class="member detail thrown list"><dl><dt class="member detail thrown header"><b>Throws:</b></dt><dd class="member detail thrown item"><code class="name"><a href="../../javax/mail/MessagingException.html" title="Class in javax.mail">MessagingException</a></code><span class="separator"> - </span><span class="description">for other failures</span></dd></dl></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="connect(String,int,String,String)" id="connect(String,int,String,String)"/><div class="member detail outer"><h3 class="member detail name">connect</h3><pre class="member detail synopsis">public void connect(String host,
int port,
String user,
String password)
throws <a href="../../javax/mail/MessagingException.html" title="Class in javax.mail">MessagingException</a></pre><blockquote class="member detail name"><div class="member detail description"> Similar to connect(host, user, password) except a specific port can be
specified.
</div><div class="parameter"><dl><dt class="header"><b>Parameters:</b></dt><dd class="item"><code class="name">host</code><span class="separator"> - </span><span class="description">the host to connect to</span></dd><dd class="item"><code class="name">port</code><span class="separator"> - </span><span class="description">the port to use (-1 means use default port)</span></dd><dd class="item"><code class="name">user</code><span class="separator"> - </span><span class="description">the user name</span></dd><dd class="item"><code class="name">password</code><span class="separator"> - </span><span class="description">this user's password</span></dd></dl></div><div class="member detail thrown list"><dl><dt class="member detail thrown header"><b>Throws:</b></dt><dd class="member detail thrown item"><code class="name"><a href="../../javax/mail/MessagingException.html" title="Class in javax.mail">MessagingException</a></code><span class="separator"> - </span><span class="description">for other failures</span></dd></dl></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="getURLName()" id="getURLName()"/><div class="member detail outer"><h3 class="member detail name">getURLName</h3><pre class="member detail synopsis">public <a href="../../javax/mail/URLName.html" title="Class in javax.mail">URLName</a> getURLName()</pre><blockquote class="member detail name"><div class="member detail description"> Return a URLName representing this service.
The returned URLName does not 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 url field with the password and file information stripped out.
</div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="isConnected()" id="isConnected()"/><div class="member detail outer"><h3 class="member detail name">isConnected</h3><pre class="member detail synopsis">public boolean isConnected()</pre><blockquote class="member detail name"><div class="member detail description"> 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.
</div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="notifyConnectionListeners(int)" id="notifyConnectionListeners(int)"/><div class="member detail outer"><h3 class="member detail name">notifyConnectionListeners</h3><pre class="member detail synopsis">protected void notifyConnectionListeners(int type)</pre><blockquote class="member detail name"><div class="member detail description"> Notify all ConnectionListeners.
Service implementations are expected to use this method
to broadcast connection events.
</div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="protocolConnect(String,int,String,String)" id="protocolConnect(String,int,String,String)"/><div class="member detail outer"><h3 class="member detail name">protocolConnect</h3><pre class="member detail synopsis">protected boolean protocolConnect(String host,
int port,
String user,
String password)
throws <a href="../../javax/mail/MessagingException.html" title="Class in javax.mail">MessagingException</a></pre><blockquote class="member detail name"><div class="member detail description"> The service implementation should override this method to perform the
actual protocol-specific connection attempt.
The default implementation of the <code>connect</code> method calls
this method as needed.
<p/>
The <code>protocolConnect</code> method should return false if a user
name or password is required for authentication but the corresponding
parameter is null; the connect method will prompt the user when needed
to supply missing information. This method may also return false if
authentication fails for the supplied user name or password.
Alternatively, this method may throw an AuthenticationFailedException
when authentication fails. This exception may include a String message
with more detail about the failure.
<p/>
The <code>protocolConnect</code> method should throw an exception to
report failures not related to authentication, such as an invalid host
name or port number, loss of a connection during the authentication
process, unavailability of the server, etc.
</div><div class="parameter"><dl><dt class="header"><b>Parameters:</b></dt><dd class="item"><code class="name">host</code><span class="separator"> - </span><span class="description">the name of the host to connect to</span></dd><dd class="item"><code class="name">port</code><span class="separator"> - </span><span class="description">the port to use (-1 means use default port)</span></dd><dd class="item"><code class="name">user</code><span class="separator"> - </span><span class="description">the name of the user to login as</span></dd><dd class="item"><code class="name">password</code><span class="separator"> - </span><span class="description">the user's password</span></dd></dl></div><div class="member detail return list"><dl><dt class="member detail return header"><b>Returns:</b></dt><dd class="member detail return item">true if connection successful, false if authentication failed</dd></dl></div><div class="member detail thrown list"><dl><dt class="member detail thrown header"><b>Throws:</b></dt><dd class="member detail thrown item"><code class="name"><a href="../../javax/mail/MessagingException.html" title="Class in javax.mail">MessagingException</a></code><span class="separator"> - </span><span class="description">for non-authentication failures</span></dd></dl></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="removeConnectionListener(javax.mail.event.ConnectionListener)" id="removeConnectionListener(javax.mail.event.ConnectionListener)"/><div class="member detail outer"><h3 class="member detail name">removeConnectionListener</h3><pre class="member detail synopsis">public void removeConnectionListener(<a href="../../javax/mail/event/ConnectionListener.html" title="Interface in javax.mail.event">ConnectionListener</a> l)</pre><blockquote class="member detail name"><div class="member detail description"> Remove a Connection event listener.
</div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="setConnected(boolean)" id="setConnected(boolean)"/><div class="member detail outer"><h3 class="member detail name">setConnected</h3><pre class="member detail synopsis">protected void setConnected(boolean connected)</pre><blockquote class="member detail name"><div class="member detail description"> Set the connection state of this service.
The connection state will automatically be set by the service
implementation during the connect and close 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.
</div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="setURLName(javax.mail.URLName)" id="setURLName(javax.mail.URLName)"/><div class="member detail outer"><h3 class="member detail name">setURLName</h3><pre class="member detail synopsis">protected void setURLName(<a href="../../javax/mail/URLName.html" title="Class in javax.mail">URLName</a> url)</pre><blockquote class="member detail name"><div class="member detail description"> Set the URLName representing this service.
Normally used to update the url 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 URLName; a new URLName should be constructed with any
unneeded fields removed.
<p/>
The implementation in the Service class simply sets the url field.
</div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div><hr/><a name="toString()" id="toString()"/><div class="member detail outer"><h3 class="member detail name">toString</h3><pre class="member detail synopsis">public String toString()</pre><blockquote class="member detail name"><div class="member detail description"> Return getURLName.toString() if this service has a URLName,
otherwise it will return the default toString.
</div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div><div class="taglet"></div></blockquote></div></div><p class="navbar bottom spacer"> </p><table class="navbar div bottom"><tr><td><div class="navbar div top"><span class="navbar item enabled"><a href="../../overview-summary.html">Overview</a></span> <span class="navbar item enabled"><a href="package-summary.html">Package</a></span> <span class="navbar item active">Class</span> <span class="navbar item enabled"><a href="Service-uses.html">Use</a></span> <span class="navbar item enabled"><a href="tree.html">Tree</a></span> <span class="navbar item enabled"><a href="../../alphaindex.html">Index</a></span> <span class="navbar item enabled"><a href="../../deprecated.html">Deprecated</a></span> <span class="navbar item enabled"><a href="../../about.html">About</a></span></div></td></tr></table><hr/>© Copyright 2003, 2004
The Free Software Foundation, All rights reserved</body></html>