KickJava   Java API By Example, From Geeks To Geeks.

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


1 package alt.javax.mail;
2
3 import javax.mail.*;
4 import java.util.Properties JavaDoc;
5
6 public class SessionImpl implements Session {
7     private final javax.mail.Session JavaDoc session;
8
9     public SessionImpl(javax.mail.Session JavaDoc session) {
10         this.session = session;
11     }
12
13     public Session getInstance(Properties JavaDoc props, Authenticator
14         authenticator) {
15
16         return new SessionImpl(session.getInstance(props, authenticator));
17     }
18
19     public Session getInstance(Properties JavaDoc props) {
20         return new SessionImpl(session.getInstance(props));
21     }
22
23     public Session getDefaultInstance(Properties JavaDoc props, Authenticator
24         authenticator) {
25         return new SessionImpl(session.getDefaultInstance(
26             props, authenticator));
27     }
28
29     public Session getDefaultInstance(Properties JavaDoc props) {
30         return new SessionImpl(session.getDefaultInstance(props));
31     }
32
33     public void setDebug(boolean debug) {
34     }
35
36     public boolean getDebug() {
37         return session.getDebug();
38     }
39
40     public Provider getProviders()[] {
41         return session.getProviders();
42     }
43
44     public Provider getProvider(String JavaDoc protocol) throws NoSuchProviderException {
45         return session.getProvider(protocol);
46     }
47
48     public void setProvider(Provider provider) throws NoSuchProviderException {
49         session.setProvider(provider);
50     }
51
52     public Store getStore() throws NoSuchProviderException {
53         return session.getStore();
54     }
55
56     public Store getStore(String JavaDoc protocol) throws NoSuchProviderException {
57         return session.getStore(protocol);
58     }
59
60     public Store getStore(URLName url) throws NoSuchProviderException {
61         return session.getStore(url);
62     }
63
64     public Store getStore(Provider provider) throws NoSuchProviderException {
65         return session.getStore(provider);
66     }
67
68     public Folder getFolder(URLName url) throws MessagingException {
69         return session.getFolder(url);
70     }
71
72     public Transport getTransport() throws NoSuchProviderException {
73         return new TransportImpl(session.getTransport());
74     }
75
76     public Transport getTransport(String JavaDoc protocol) throws NoSuchProviderException {
77         return new TransportImpl(session.getTransport(protocol));
78     }
79
80     public Transport getTransport(URLName url) throws NoSuchProviderException {
81         return new TransportImpl(session.getTransport(url));
82     }
83
84     public Transport getTransport(Provider provider) throws NoSuchProviderException {
85         return new TransportImpl(session.getTransport(provider));
86     }
87
88     public Transport getTransport(Address address) throws NoSuchProviderException {
89         return new TransportImpl(session.getTransport(address));
90     }
91
92     public void setPasswordAuthentication(URLName url, PasswordAuthentication pw) {
93         session.setPasswordAuthentication(url, pw);
94     }
95
96     public PasswordAuthentication getPasswordAuthentication(URLName url) {
97         return session.getPasswordAuthentication(url);
98     }
99
100     public PasswordAuthentication requestPasswordAuthentication(java.net.InetAddress JavaDoc addr, int port, String JavaDoc protocol, String JavaDoc prompt, String JavaDoc defaultUserName) {
101         return session.requestPasswordAuthentication(addr, port, protocol,
102             prompt, defaultUserName);
103     }
104
105     public Properties JavaDoc getProperties() {
106         return session.getProperties();
107     }
108
109     public String JavaDoc getProperty(String JavaDoc name) {
110         return session.getProperty(name);
111     }
112
113     public javax.mail.Session JavaDoc getWrappedSession() {
114         return session;
115     }
116
117 }
118
Popular Tags