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