ludc
2025-01-16 986aa62ed00bee39363bab41b4eeb8259d446efd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package org.jbpm.pvm.internal.email.impl;
 
import java.util.Properties;
 
import javax.mail.Authenticator;
import javax.mail.Session;
 
/**
 * Settings for establishing a session with a mail server.
 * 
 * @author Brad Davis
 */
public class MailServer {
 
  private AddressFilter addressFilter;
  private Properties sessionProperties;
  private Authenticator authenticator;
 
  public AddressFilter getAddressFilter() {
    return addressFilter;
  }
 
  protected void setAddressFilter(AddressFilter filter) {
    this.addressFilter = filter;
  }
 
  public Properties getSessionProperties() {
    return sessionProperties;
  }
 
  protected void setSessionProperties(Properties sessionProperties) {
    this.sessionProperties = sessionProperties;
  }
 
  public Authenticator getAuthenticator() {
    return authenticator;
  }
 
  protected void setAuthenticator(Authenticator authenticator) {
    this.authenticator = authenticator;
  }
 
  public Session getMailSession() {
    return Session.getDefaultInstance(sessionProperties, authenticator);
  }
}