com.funambol.email.transport
Class PopMailServerWrapper
java.lang.Object
com.funambol.email.transport.CommonMailServerWrapper
com.funambol.email.transport.PopMailServerWrapper
- All Implemented Interfaces:
- IMailServerWrapper
public class PopMailServerWrapper
- extends CommonMailServerWrapper
- implements IMailServerWrapper
Create a connection with a Mail Server
|
Method Summary |
com.sun.mail.pop3.POP3Folder |
getInboxFolder()
returns Inbox Folder Instance |
void |
openConnection(java.lang.String serverType,
java.lang.String outgoingServer,
java.lang.String outgoingPort,
boolean smtpAuth,
java.lang.String incomingServer,
java.lang.String incomingPort,
DefaultFolder df,
java.lang.String user,
java.lang.String password,
boolean isSSLIn,
boolean isSSLOut,
java.lang.String keystorePath,
java.lang.String keystorePassphrase)
opens the connection with the mail server |
void |
releaseConnection()
closes the connection with the mail server |
protected void |
setConnectionNormalIn(java.util.Properties props,
java.lang.String incomingServer,
java.lang.String incomingPort,
boolean portalCheck,
int portalCheckTimeout)
|
protected void |
setConnectionNormalOut(java.util.Properties props,
java.lang.String outgoingServer,
java.lang.String outgoingPort,
boolean smtpAuth)
|
protected void |
setConnectionSSLIn(java.util.Properties props,
java.lang.String incomingServer,
java.lang.String incomingPort,
com.sun.net.ssl.internal.ssl.Provider provider,
java.lang.String keystorePath,
java.lang.String keystorePassphrase,
boolean portalCheck,
int portalCheckTimeout)
|
protected void |
setConnectionSSLOut(java.util.Properties props,
java.lang.String outgoingServer,
java.lang.String outgoingPort,
boolean smtpAuth,
com.sun.net.ssl.internal.ssl.Provider provider,
java.lang.String keystorePath,
java.lang.String keystorePassphrase)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
messagesInboxOpened
public javax.mail.Message[] messagesInboxOpened
- used in the getMessageByUID method. in the POP protocol
there is no the method "folder.getMessageByUID(String)
At the end of the sync session the server calls the getSyncItem
In this method we open and close the folder every time.
Using this propreties we can leave the folder open for alle the
calls to the getSyncItem method.
In the EndSync we close this folder if it's open
folderInboxOpened
public com.sun.mail.pop3.POP3Folder folderInboxOpened
PopMailServerWrapper
public PopMailServerWrapper()
openConnection
public void openConnection(java.lang.String serverType,
java.lang.String outgoingServer,
java.lang.String outgoingPort,
boolean smtpAuth,
java.lang.String incomingServer,
java.lang.String incomingPort,
DefaultFolder df,
java.lang.String user,
java.lang.String password,
boolean isSSLIn,
boolean isSSLOut,
java.lang.String keystorePath,
java.lang.String keystorePassphrase)
throws EmailAccessException
- opens the connection with the mail server
- Specified by:
openConnection in interface IMailServerWrapper- Specified by:
openConnection in class CommonMailServerWrapper
- Parameters:
serverType - Server TypeoutgoingServer - SMPT address i.e. 192.168.0.1outgoingPort - 25 def.smtpAuth - booleanincomingServer - POP3 address i.e. 192.168.0.1incomingPort - 110 / 995 POP3 def.df - inbox, outbox, sent items,...user - Stringpassword - StringisSSLIn - booleanisSSLOut - booleankeystorePath - StringkeystorePassphrase - String
- Throws:
EmailAccessException
releaseConnection
public void releaseConnection()
throws EmailAccessException
- closes the connection with the mail server
- Specified by:
releaseConnection in interface IMailServerWrapper- Specified by:
releaseConnection in class CommonMailServerWrapper
- Throws:
EmailAccessException
getInboxFolder
public com.sun.mail.pop3.POP3Folder getInboxFolder()
throws EmailAccessException
- returns Inbox Folder Instance
- Returns:
- POP3Folder
- Throws:
EmailAccessException
setConnectionSSLIn
protected void setConnectionSSLIn(java.util.Properties props,
java.lang.String incomingServer,
java.lang.String incomingPort,
com.sun.net.ssl.internal.ssl.Provider provider,
java.lang.String keystorePath,
java.lang.String keystorePassphrase,
boolean portalCheck,
int portalCheckTimeout)
- Specified by:
setConnectionSSLIn in class CommonMailServerWrapper
- Parameters:
props - PropertiesincomingServer - StringincomingPort - Stringprovider - ProviderkeystorePath - StringkeystorePassphrase - String
setConnectionSSLOut
protected void setConnectionSSLOut(java.util.Properties props,
java.lang.String outgoingServer,
java.lang.String outgoingPort,
boolean smtpAuth,
com.sun.net.ssl.internal.ssl.Provider provider,
java.lang.String keystorePath,
java.lang.String keystorePassphrase)
- Specified by:
setConnectionSSLOut in class CommonMailServerWrapper
- Parameters:
props - PropertiesoutgoingServer - StringoutgoingPort - StringsmtpAuth - booleanprovider - ProviderkeystorePath - StringkeystorePassphrase - String
setConnectionNormalIn
protected void setConnectionNormalIn(java.util.Properties props,
java.lang.String incomingServer,
java.lang.String incomingPort,
boolean portalCheck,
int portalCheckTimeout)
- Specified by:
setConnectionNormalIn in class CommonMailServerWrapper
- Parameters:
props - PropertiesincomingServer - StringincomingPort - String
setConnectionNormalOut
protected void setConnectionNormalOut(java.util.Properties props,
java.lang.String outgoingServer,
java.lang.String outgoingPort,
boolean smtpAuth)
- Specified by:
setConnectionNormalOut in class CommonMailServerWrapper
- Parameters:
props - PropertiesoutgoingServer - StringoutgoingPort - StringsmtpAuth - boolean
Copyright © 2005-2006 Funambol.