public abstract class Service
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
host |
protected java.lang.String |
password |
protected int |
port |
protected MailSession |
session |
protected java.lang.String |
user |
Modifier | Constructor and Description |
---|---|
protected |
Service(MailSession session) |
Modifier and Type | Method and Description |
---|---|
abstract void |
close()
Close this service and terminate its connection.
|
abstract void |
connect()
A generic connect method that takes no parameters.
|
abstract void |
connect(java.lang.String host,
int port,
java.lang.String user,
java.lang.String password) |
protected void |
protocolConnect(java.lang.String host,
int port,
java.lang.String login,
java.lang.String password) |
protected MailSession session
protected java.lang.String host
protected int port
protected java.lang.String user
protected java.lang.String password
protected Service(MailSession session)
public abstract void connect() throws AuthenticationException, MessagingException
AuthenticationException
MessagingException
public abstract void connect(java.lang.String host, int port, java.lang.String user, java.lang.String password) throws AuthenticationException, MessagingException
public abstract void close() throws MessagingException
MessagingException
protected void protocolConnect(java.lang.String host, int port, java.lang.String login, java.lang.String password) throws AuthenticationException, MessagingException