Package totalcross.net.mail
Class Service
- java.lang.Object
-
- totalcross.net.mail.Service
-
- Direct Known Subclasses:
Transport
public abstract class Service extends java.lang.ObjectAn abstract class that models a message store and its access protocol, for storing and retrieving messages. Subclasses provide actual implementations.- Since:
- TotalCross 1.13
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedService(MailSession session)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voidclose()Close this service and terminate its connection.abstract voidconnect()A generic connect method that takes no parameters.abstract voidconnect(java.lang.String host, int port, java.lang.String user, java.lang.String password)protected voidprotocolConnect(java.lang.String host, int port, java.lang.String login, java.lang.String password)
-
-
-
Field Detail
-
session
protected MailSession session
-
host
protected java.lang.String host
-
port
protected int port
-
user
protected java.lang.String user
-
password
protected java.lang.String password
-
-
Constructor Detail
-
Service
protected Service(MailSession session)
-
-
Method Detail
-
connect
public abstract void connect() throws AuthenticationException, MessagingExceptionA generic connect method that takes no parameters. Subclasses can implement the appropriate authentication schemes. Subclasses that need additional information might want to use some properties or might get it interactively. Most clients should just call this method to connect to the store.- Throws:
AuthenticationExceptionMessagingException- Since:
- TotalCross 1.13
-
connect
public abstract void connect(java.lang.String host, int port, java.lang.String user, java.lang.String password) throws AuthenticationException, MessagingException
-
close
public abstract void close() throws MessagingExceptionClose this service and terminate its connection. Any Messaging components (Folders, Messages, etc.) belonging to this service are invalid after this store is closed. Note that the store is closed even if this method terminates abnormally by throwing a MessagingException.- Throws:
MessagingException- Since:
- TotalCross 1.13
-
protocolConnect
protected void protocolConnect(java.lang.String host, int port, java.lang.String login, java.lang.String password) throws AuthenticationException, MessagingException
-
-