KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > alt > javax > mail > TransportImpl


1 package alt.javax.mail;
2
3 import alt.javax.mail.Message;
4 import javax.mail.MessagingException JavaDoc;
5 import javax.mail.Address JavaDoc;
6 import javax.mail.event.TransportListener JavaDoc;
7
8 public class TransportImpl extends ServiceImpl implements Transport {
9
10     private final javax.mail.Transport JavaDoc transport;
11
12     public TransportImpl(javax.mail.Transport JavaDoc transport){
13         super(transport);
14         this.transport = transport;
15     }
16
17     public void send(Message message) throws MessagingException JavaDoc{
18         transport.send(message.getRealMessage());
19     }
20
21     public void send(Message message, Address JavaDoc[] addresses)
22     throws MessagingException JavaDoc{
23         transport.send(message.getRealMessage(), addresses);
24     }
25
26     public void sendMessage(Message message, Address JavaDoc[] addresses)
27     throws MessagingException JavaDoc{
28         transport.sendMessage(message.getRealMessage(), addresses);
29     }
30
31     public void addTransportListener(TransportListener JavaDoc transportListener){
32         transport.addTransportListener(transportListener);
33     }
34
35     public void removeTransportListener(TransportListener JavaDoc transportListener){
36         transport.removeTransportListener(transportListener);
37     }
38
39 }
40
Popular Tags