<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<!-- Generated by javadoc (build 1.6.0_10) on Tue Nov 17 12:13:38 PST 2009 -->
<
META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
Transport (JavaMail API documentation)
<
META NAME="date" CONTENT="2009-11-17">
<
LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
<
SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Transport (JavaMail API documentation)";
}
}
<
BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<
A NAME="navbar_top"><!-- --><
/A>
<
A HREF="#skip-navbar_top" title="Skip navigation links"><
/A>
<
TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<
TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<
A NAME="navbar_top_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> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="package-summary.html"><
FONT CLASS="NavBarFont1"><
B>Package<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <
FONT CLASS="NavBarFont1Rev"><
B>Class<
/B><
/FONT> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="class-use/Transport.html"><
FONT CLASS="NavBarFont1"><
B>Use<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="package-tree.html"><
FONT CLASS="NavBarFont1"><
B>Tree<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../deprecated-list.html"><
FONT CLASS="NavBarFont1"><
B>Deprecated<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../index-files/index-1.html"><
FONT CLASS="NavBarFont1"><
B>Index<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../help-doc.html"><
FONT CLASS="NavBarFont1"><
B>Help<
/B><
/FONT><
/A> <
/TD>
<
TD ALIGN="right" VALIGN="top" ROWSPAN=3><
EM>
<
TD BGCOLOR="white" CLASS="NavBarCell2"><
FONT SIZE="-2">
<
A HREF="../../javax/mail/StoreClosedException.html" title="class in javax.mail"><
B>PREV CLASS<
/B><
/A>
<
A HREF="../../javax/mail/UIDFolder.html" title="interface in javax.mail"><
B>NEXT CLASS<
/B><
/A><
/FONT><
/TD>
<
TD BGCOLOR="white" CLASS="NavBarCell2"><
FONT SIZE="-2">
<
A HREF="../../index.html?javax/mail/Transport.html" target="_top"><
B>FRAMES<
/B><
/A>
<
A HREF="Transport.html" target="_top"><
B>NO FRAMES<
/B><
/A>
<
SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
<
A HREF="../../allclasses-noframe.html"><
B>All Classes<
/B><
/A>
<
TD VALIGN="top" CLASS="NavBarCell3"><
FONT SIZE="-2">
SUMMARY: NESTED | <
A HREF="#fields_inherited_from_class_javax.mail.Service">FIELD<
/A> | <
A HREF="#constructor_summary">CONSTR<
/A> | <
A HREF="#method_summary">METHOD<
/A><
/FONT><
/TD>
<
TD VALIGN="top" CLASS="NavBarCell3"><
FONT SIZE="-2">
DETAIL: FIELD | <
A HREF="#constructor_detail">CONSTR<
/A> | <
A HREF="#method_detail">METHOD<
/A><
/FONT><
/TD>
<
A NAME="skip-navbar_top"><
/A>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.
lang.Object<
/A>
<
IMG SRC="../../resources/inherit.gif" ALT="extended by "><
A HREF="../../javax/mail/Service.html" title="class in javax.mail">javax.mail.Service<
/A>
<
IMG SRC="../../resources/inherit.gif" ALT="extended by "><
B>javax.mail.Transport<
/B>
<
DT><
B>Direct Known Subclasses:<
/B> <
DD><
A HREF="../../com/sun/mail/smtp/SMTPTransport.html" title="class in com.sun.mail.smtp">SMTPTransport<
/A><
/DD>
<
DT><
PRE>public abstract
class <
B>Transport<
/B><
DT>extends <
A HREF="../../javax/mail/Service.html" title="class in javax.mail">Service<
/A><
/DL>
An abstract class that models a message transport.
Subclasses provide actual implementations. <
p>
class, which provides many common methods for naming transports,
connecting to transports, and listening to connection events.
<
DT><
B>See Also:<
/B><
DD><
A HREF="../../javax/mail/Service.html" title="class in javax.mail"><
CODE>Service<
/CODE><
/A>,
<
A HREF="../../javax/mail/event/ConnectionEvent.html" title="class in javax.mail.event"><
CODE>ConnectionEvent<
/CODE><
/A>,
<
A HREF="../../javax/mail/event/TransportEvent.html" title="class in javax.mail.event"><
CODE>TransportEvent<
/CODE><
/A><
/DL>
<!-- =========== FIELD SUMMARY =========== -->
<
A NAME="field_summary"><!-- --><
/A>
<
TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<
TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<
TH ALIGN="left" COLSPAN="2"><
FONT SIZE="+2">
<
A NAME="fields_inherited_from_class_javax.mail.Service"><!-- --><
/A>
<
TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<
TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<
TH ALIGN="left"><
B>Fields inherited from
class javax.mail.<
A HREF="../../javax/mail/Service.html" title="class in javax.mail">Service<
/A><
/B><
/TH>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD><
CODE><
A HREF="../../javax/mail/Service.html#debug">debug<
/A>, <
A HREF="../../javax/mail/Service.html#session">session<
/A>, <
A HREF="../../javax/mail/Service.html#url">url<
/A><
/CODE><
/TD>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<
A NAME="constructor_summary"><!-- --><
/A>
<
TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<
TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<
TH ALIGN="left" COLSPAN="2"><
FONT SIZE="+2">
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD><
CODE><
B><
A HREF="../../javax/mail/Transport.html#Transport(javax.mail.Session, javax.mail.URLName)">Transport<
/A><
/B>
(<
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> urlname
)<
/CODE>
Constructor.<
/TD>
<!-- ========== METHOD SUMMARY =========== -->
<
A NAME="method_summary"><!-- --><
/A>
<
TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<
TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<
TH ALIGN="left" COLSPAN="2"><
FONT SIZE="+2">
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../javax/mail/Transport.html#addTransportListener(javax.mail.event.TransportListener)">addTransportListener<
/A><
/B>
(<
A HREF="../../javax/mail/event/TransportListener.html" title="interface in javax.mail.event">TransportListener<
/A> l
)<
/CODE>
Add a listener
for Transport events.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../javax/mail/Transport.html#notifyTransportListeners(int, javax.mail.Address[], javax.mail.Address[], javax.mail.Address[], javax.mail.Message)">notifyTransportListeners<
/A><
/B>
(int
type,
<
A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address<
/A>
[] validSent,
<
A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address<
/A>
[] validUnsent,
<
A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address<
/A>
[] invalid,
<
A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message<
/A> msg
)<
/CODE>
Notify all TransportListeners.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../javax/mail/Transport.html#removeTransportListener(javax.mail.event.TransportListener)">removeTransportListener<
/A><
/B>
(<
A HREF="../../javax/mail/event/TransportListener.html" title="interface in javax.mail.event">TransportListener<
/A> l
)<
/CODE>
Remove a listener
for Transport events.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../javax/mail/Transport.html#send(javax.mail.Message)">send<
/A><
/B>
(<
A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message<
/A> msg
)<
/CODE>
Send a message.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../javax/mail/Transport.html#send(javax.mail.Message, javax.mail.Address[])">send<
/A><
/B>
(<
A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message<
/A> msg,
<
A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address<
/A>
[] addresses
)<
/CODE>
Send the message to the specified addresses, ignoring any
recipients specified in the message itself.<
/TD>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD ALIGN="right" VALIGN="top" WIDTH="1%"><
FONT SIZE="-1">
<
TD><
CODE><
B><
A HREF="../../javax/mail/Transport.html#sendMessage(javax.mail.Message, javax.mail.Address[])">sendMessage<
/A><
/B>
(<
A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message<
/A> msg,
<
A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address<
/A>
[] addresses
)<
/CODE>
Send the Message to the specified list of addresses.<
/TD>
<
A NAME="methods_inherited_from_class_javax.mail.Service"><!-- --><
/A>
<
TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<
TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<
TH ALIGN="left"><
B>Methods inherited from
class javax.mail.<
A HREF="../../javax/mail/Service.html" title="class in javax.mail">Service<
/A><
/B><
/TH>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD><
CODE><
A HREF="../../javax/mail/Service.html#addConnectionListener(javax.mail.event.ConnectionListener)">addConnectionListener<
/A>, <
A HREF="../../javax/mail/Service.html#close()">close<
/A>, <
A HREF="../../javax/mail/Service.html#connect()">connect<
/A>, <
A HREF="../../javax/mail/Service.html#connect(java.lang.String, int, java.lang.String, java.lang.String)">connect<
/A>, <
A HREF="../../javax/mail/Service.html#connect(java.lang.String, java.lang.String)">connect<
/A>, <
A HREF="../../javax/mail/Service.html#connect(java.lang.String, java.lang.String, java.lang.String)">connect<
/A>, <
A HREF="../../javax/mail/Service.html#finalize()">finalize<
/A>, <
A HREF="../../javax/mail/Service.html#getURLName()">getURLName<
/A>, <
A HREF="../../javax/mail/Service.html#isConnected()">isConnected<
/A>, <
A HREF="../../javax/mail/Service.html#notifyConnectionListeners(int)">notifyConnectionListeners<
/A>, <
A HREF="../../javax/mail/Service.html#protocolConnect(java.lang.String, int, java.lang.String, java.lang.String)">protocolConnect<
/A>, <
A HREF="../../javax/mail/Service.html#queueEvent(javax.mail.event.MailEvent, java.util.Vector)">queueEvent<
/A>, <
A HREF="../../javax/mail/Service.html#removeConnectionListener(javax.mail.event.ConnectionListener)">removeConnectionListener<
/A>, <
A HREF="../../javax/mail/Service.html#setConnected(boolean)">setConnected<
/A>, <
A HREF="../../javax/mail/Service.html#setURLName(javax.mail.URLName)">setURLName<
/A>, <
A HREF="../../javax/mail/Service.html#toString()">toString<
/A><
/CODE><
/TD>
<
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.4.2/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object<
/A><
/B><
/TH>
<
TR BGCOLOR="white" CLASS="TableRowColor">
<
TD><
CODE><
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone<
/A>, <
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals<
/A>, <
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass<
/A>, <
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode<
/A>, <
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify<
/A>, <
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll<
/A>, <
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait<
/A>, <
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait<
/A>, <
A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait<
/A><
/CODE><
/TD>
<!-- ========= 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">
<
A NAME="Transport(javax.mail.Session, javax.mail.URLName)"><!-- --><
/A><
H3>
public <
B>Transport<
/B>
(<
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> urlname
)<
/PRE>
<
DT><
B>Parameters:<
/B><
DD><
CODE>session<
/CODE> - Session
object for this Transport.<
DD><
CODE>urlname<
/CODE> - URLName
object to be used
for this Transport<
/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">
<
A NAME="send(javax.mail.Message)"><!-- --><
/A><
H3>
public static void <
B>send<
/B>
(<
A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message<
/A> msg
)
throws <
A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Send a message. The message will be sent to all recipient
addresses specified in the message (as returned from the
using message transports appropriate to each address. The
method on the message before sending it. <
p>
If any of the recipient addresses is detected to be invalid by
the Transport during message submission, a SendFailedException
is thrown. Clients can get more detail about the failure by examining
the exception. Whether or not the message is still sent successfully
to any valid addresses depends on the Transport implementation. See
SendFailedException for more details. Note also that success does
not imply that the message was delivered to the ultimate recipient,
as failures may occur in later stages of delivery. Once a Transport
accepts a message for delivery to a recipient, failures that occur later
should be reported to the user via another mechanism, such as
returning the undeliverable message. <
p>
In typical usage, a SendFailedException reflects an error detected
by the server. The details of the SendFailedException will usually
contain the error message from the server (such as an SMTP error
message). An address may be detected as invalid for a variety of
reasons - the address may not exist, the address may have invalid
syntax, the address may have exceeded its quota, etc. <
p>
Note that <
code>send<
/code> is a static
method that creates and
manages its own connection. Any connection associated with any
Transport instance used to invoke this method is ignored and not
used. This method should only be invoked using the form
<
code>Transport.send
(msg
);<
/code>, and should never be invoked
using an instance variable.
<
DD><
CODE><
A HREF="../../javax/mail/SendFailedException.html" title="class in javax.mail">SendFailedException<
/A><
/CODE> - if the message could not
be sent to some or any of the recipients.
<
DD><
CODE><
A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
DT><
B>See Also:<
/B><
DD><
A HREF="../../javax/mail/Message.html#saveChanges()"><
CODE>Message.saveChanges
()<
/CODE><
/A>,
<
A HREF="../../javax/mail/Message.html#getAllRecipients()"><
CODE>Message.getAllRecipients
()<
/CODE><
/A>,
<
A HREF="../../javax/mail/Transport.html#send(javax.mail.Message, javax.mail.Address[])"><
CODE>send
(Message, Address
[])<
/CODE><
/A>,
<
A HREF="../../javax/mail/SendFailedException.html" title="class in javax.mail"><
CODE>SendFailedException<
/CODE><
/A><
/DL>
<
A NAME="send(javax.mail.Message, javax.mail.Address[])"><!-- --><
/A><
H3>
public static void <
B>send<
/B>
(<
A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message<
/A> msg,
<
A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address<
/A>
[] addresses
)
throws <
A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Send the message to the specified addresses, ignoring any
recipients specified in the message itself. The
method on the message before sending it. <
p>
<
DT><
B>Parameters:<
/B><
DD><
CODE>msg<
/CODE> - the message to send<
DD><
CODE>addresses<
/CODE> - the addresses to which to send the message
<
DD><
CODE><
A HREF="../../javax/mail/SendFailedException.html" title="class in javax.mail">SendFailedException<
/A><
/CODE> - if the message could not
be sent to some or any of the recipients.
<
DD><
CODE><
A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE><
DT><
B>See Also:<
/B><
DD><
A HREF="../../javax/mail/Message.html#saveChanges()"><
CODE>Message.saveChanges
()<
/CODE><
/A>,
<
A HREF="../../javax/mail/Transport.html#send(javax.mail.Message)"><
CODE>send
(Message
)<
/CODE><
/A>,
<
A HREF="../../javax/mail/SendFailedException.html" title="class in javax.mail"><
CODE>SendFailedException<
/CODE><
/A><
/DL>
<
A NAME="sendMessage(javax.mail.Message, javax.mail.Address[])"><!-- --><
/A><
H3>
public abstract void <
B>sendMessage<
/B>
(<
A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message<
/A> msg,
<
A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address<
/A>
[] addresses
)
throws <
A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/PRE>
<
DD>Send the Message to the specified list of addresses. An appropriate
TransportEvent indicating the delivery status is delivered to any
TransportListener registered on this Transport. Also, if any of
the addresses is invalid, a SendFailedException is thrown.
Whether or not the message is still sent succesfully to
any valid addresses depends on the Transport implementation. <
p>
method does <
em>not<
/em> call the <
code>saveChanges<
/code>
method on
the message; the caller should do so.
<
DT><
B>Parameters:<
/B><
DD><
CODE>msg<
/CODE> - The Message to be sent<
DD><
CODE>addresses<
/CODE> - array of addresses to send this message to
<
DD><
CODE><
A HREF="../../javax/mail/SendFailedException.html" title="class in javax.mail">SendFailedException<
/A><
/CODE> - if the send failed because of
invalid addresses.
<
DD><
CODE><
A HREF="../../javax/mail/MessagingException.html" title="class in javax.mail">MessagingException<
/A><
/CODE> - if the connection is dead or not in the
connected state<
DT><
B>See Also:<
/B><
DD><
A HREF="../../javax/mail/event/TransportEvent.html" title="class in javax.mail.event"><
CODE>TransportEvent<
/CODE><
/A><
/DL>
<
A NAME="addTransportListener(javax.mail.event.TransportListener)"><!-- --><
/A><
H3>
addTransportListener<
/H3>
public void <
B>addTransportListener<
/B>
(<
A HREF="../../javax/mail/event/TransportListener.html" title="interface in javax.mail.event">TransportListener<
/A> l
)<
/PRE>
<
DD>Add a listener
for Transport events. <
p>
The default implementation provided here adds this listener
to an internal list of TransportListeners.
<
DT><
B>Parameters:<
/B><
DD><
CODE>l<
/CODE> - the Listener
for Transport events<
DT><
B>See Also:<
/B><
DD><
A HREF="../../javax/mail/event/TransportEvent.html" title="class in javax.mail.event"><
CODE>TransportEvent<
/CODE><
/A><
/DL>
<
A NAME="removeTransportListener(javax.mail.event.TransportListener)"><!-- --><
/A><
H3>
removeTransportListener<
/H3>
public void <
B>removeTransportListener<
/B>
(<
A HREF="../../javax/mail/event/TransportListener.html" title="interface in javax.mail.event">TransportListener<
/A> l
)<
/PRE>
<
DD>Remove a listener
for Transport events. <
p>
The default implementation provided here removes this listener
from the internal list of TransportListeners.
<
DT><
B>Parameters:<
/B><
DD><
CODE>l<
/CODE> - the listener<
DT><
B>See Also:<
/B><
DD><
A HREF="../../javax/mail/Transport.html#addTransportListener(javax.mail.event.TransportListener)"><
CODE>addTransportListener
(javax.mail.event.TransportListener
)<
/CODE><
/A><
/DL>
<
A NAME="notifyTransportListeners(int, javax.mail.Address[], javax.mail.Address[], javax.mail.Address[], javax.mail.Message)"><!-- --><
/A><
H3>
notifyTransportListeners<
/H3>
protected void <
B>notifyTransportListeners<
/B>
(int
type,
<
A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address<
/A>
[] validSent,
<
A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address<
/A>
[] validUnsent,
<
A HREF="../../javax/mail/Address.html" title="class in javax.mail">Address<
/A>
[] invalid,
<
A HREF="../../javax/mail/Message.html" title="class in javax.mail">Message<
/A> msg
)<
/PRE>
<
DD>Notify all TransportListeners. Transport implementations are
expected to use this
method to broadcast TransportEvents.<
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
TransportListeners. Note that the event dispatching occurs
in a separate thread, thus avoiding potential deadlock problems.
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= 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="">
<
TD COLSPAN=2 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> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="package-summary.html"><
FONT CLASS="NavBarFont1"><
B>Package<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <
FONT CLASS="NavBarFont1Rev"><
B>Class<
/B><
/FONT> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="class-use/Transport.html"><
FONT CLASS="NavBarFont1"><
B>Use<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="package-tree.html"><
FONT CLASS="NavBarFont1"><
B>Tree<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../deprecated-list.html"><
FONT CLASS="NavBarFont1"><
B>Deprecated<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../index-files/index-1.html"><
FONT CLASS="NavBarFont1"><
B>Index<
/B><
/FONT><
/A> <
/TD>
<
TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <
A HREF="../../help-doc.html"><
FONT CLASS="NavBarFont1"><
B>Help<
/B><
/FONT><
/A> <
/TD>
<
TD ALIGN="right" VALIGN="top" ROWSPAN=3><
EM>
<
TD BGCOLOR="white" CLASS="NavBarCell2"><
FONT SIZE="-2">
<
A HREF="../../javax/mail/StoreClosedException.html" title="class in javax.mail"><
B>PREV CLASS<
/B><
/A>
<
A HREF="../../javax/mail/UIDFolder.html" title="interface in javax.mail"><
B>NEXT CLASS<
/B><
/A><
/FONT><
/TD>
<
TD BGCOLOR="white" CLASS="NavBarCell2"><
FONT SIZE="-2">
<
A HREF="../../index.html?javax/mail/Transport.html" target="_top"><
B>FRAMES<
/B><
/A>
<
A HREF="Transport.html" target="_top"><
B>NO FRAMES<
/B><
/A>
<
SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
<
A HREF="../../allclasses-noframe.html"><
B>All Classes<
/B><
/A>
<
TD VALIGN="top" CLASS="NavBarCell3"><
FONT SIZE="-2">
SUMMARY: NESTED | <
A HREF="#fields_inherited_from_class_javax.mail.Service">FIELD<
/A> | <
A HREF="#constructor_summary">CONSTR<
/A> | <
A HREF="#method_summary">METHOD<
/A><
/FONT><
/TD>
<
TD VALIGN="top" CLASS="NavBarCell3"><
FONT SIZE="-2">
DETAIL: FIELD | <
A HREF="#constructor_detail">CONSTR<
/A> | <
A HREF="#method_detail">METHOD<
/A><
/FONT><
/TD>
<
A NAME="skip-navbar_bottom"><
/A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
Copyright &#
169;
2009 <
a href="http://www.sun.com">Sun Microsystems, Inc.<
/a>. All Rights Reserved.